ISSN 1000-1239 CN 11-1777/TP

计算机研究与发展 ›› 2019, Vol. 56 ›› Issue (4): 810-824.doi: 10.7544/issn1000-1239.2019.20180138

• 系统结构 • 上一篇    下一篇

面向关系数据库查询的能耗建模及计划评价

国冰磊,于炯,杨德先,廖彬   

  1. (新疆大学信息科学与工程学院 乌鲁木齐 830008) (xinggbl@163.com)
  • 出版日期: 2019-04-01
  • 基金资助: 
    国家自然科学基金项目(61520106005,61761136014);国家重点研发计划项目(2017YFB1010000)

Energy Modeling and Plan Evaluation for Queries in Relational Databases

Guo Binglei, Yu Jiong, Yang Dexian, Liao Bin   

  1. (School of Information Science and Engineering, Xinjiang University, Urumqi 830008)
  • Online: 2019-04-01

摘要: 传统关系数据库在选择查询计划时,其查询优化器仅以性能为目标,限制了数据库的节能潜力.因此,基于查询的资源消耗特征(CPU指令、磁盘数据块读取、内存数据块读取),提出一种查询计划的能耗模型和评价模型.模型不仅能够精确预测查询计划的能耗,为查询优化器选择节能的计划奠定基础.还使优化器能权衡功率与性能在计划总成本中所占的权重,并根据数据库的运行状态调整查询语句的优化目标(性能、功率、能耗)选择最优计划.实验结果表明:模型平均预测正确率为95.68%;当优化目标是功率时,功率节约范围为8.95%~29.25%;当优化目标是能耗时,能耗节约范围为3.62%~11.34%.

关键词: 绿色计算, 绿色数据库, 能耗模型, 查询计划, 计划评价

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.

Key words: green computing, green databases, energy model, query plan, plan evaluation

中图分类号: