13. A system, comprising: a database; a processor; and a memory containing a program, which when executed by the processor is configured to perform an operation, comprising: receiving a database query; generating a plurality of query plans for executing the database query; estimating one or more characteristics of energy consumption for executing each query plan; estimating one or more characteristics of time for executing each query plan; and selecting one of the plurality of query plans for executing the database query, based at least on tithe one or more characteristics of energy consumption, (ii) the one or more characteristics of time, and (iii) a relative priority between the characteristics of energy consumption and the characteristics of time.
13. A system, comprising: a database; a processor; and a memory containing a program, which when executed by the processor is configured to perform an operation, comprising: receiving a database query; generating a plurality of query plans for executing the database query; estimating one or more characteristics of energy consumption for executing each query plan; estimating one or more characteristics of time for executing each query plan; and selecting one of the plurality of query plans for executing the database query, based at least on tithe one or more characteristics of energy consumption, (ii) the one or more characteristics of time, and (iii) a relative priority between the characteristics of energy consumption and the characteristics of time. 16. The system of claim 13 , wherein the one or more characteristics of energy consumption comprise at least one of (i) the electrical energy required to cool one or more hard-disk drives required to execute each query plan and (ii) the electrical energy required to cool one or more processors required to execute each query plan.