7. A computer readable storage medium containing a program which, when executed, performs 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 (i) the 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.
11. The computer readable storage medium of claim 7 , wherein the one or more characteristics of energy consumption comprise the electrical energy required to cool one or more hard-disk drives required to execute each query plan.