Abstract:
In relational database systems, the original policy model of the query optimizer ignores energy consumption and only concentrates on improving performance when selecting execution plans for queries. As a consequence, this kind of plan selection strategy will limit the energy-saving penitential of future database systems. Firstly, an energy model for query plans is proposed based on the resource consumption characteristics of queries (i.e., CPU instructions, disk block reads, and memory block reads). The energy model can predict energy cost for plans before query execution and hence laid a foundation for the optimizer to select energy-efficient plans in the decision-making phase. Secondly, to enable the optimizer to regulate the weight of power and performance in the total cost of each query plan, a query-plan evaluation model is proposed. According to a specific requirement of users, the evaluation model can change the optimization goal (performance, power, and energy) of each query and select the best execution plan for a certain query. Experimental results show that the average prediction accuracy of the energy model is 95.68%, the power savings range from 8.95% to 29.25% for the optimization goal of power, and the energy savings range from 3.62% to 11.34% for the optimization goal of energy.