首页 | 本学科首页   官方微博 | 高级检索  
     

数据库外基于多模型的学习式查询优化方法
引用本文:李广龙,申德荣,聂铁铮,寇月.数据库外基于多模型的学习式查询优化方法[J].浙江大学学报(自然科学版 ),2022,56(2):288-296.
作者姓名:李广龙  申德荣  聂铁铮  寇月
作者单位:东北大学 计算机科学与工程学院,辽宁 沈阳 110169
基金项目:国家自然科学基金资助项目(62172082 , 62072084, 62072086)
摘    要:对于AI与数据库优化问题,现有技术均须改动数据库底层,影响研究成果的应用且缺乏可扩展性. 提出一种非嵌入数据库的学习式查询优化方法. 在基数估计阶段,使用多模型的方法,对特定的子查询建立神经网络,独立训练不同的子模型,解决需要训练集过多且可扩展性差的问题;在连接优化阶段,应用基于代价的强化学习方法,提高查询优化性能. 针对每个查询,从基数估计到连接排序的优化过程都在数据库外执行,按照得到的优化策略对查询重写,并将重写结果返回到数据库中,通过设置参数使该查询按照指定的计划执行. 在包含8个表的数据集上进行实验验证,与未进行优化的查询进行比较,非嵌入数据库的优化方法具有良好的优化效果.

关 键 词:查询优化  基数估计  连接排序  神经网络  强化学习  

Learning query optimization method based on multi model outside database
Guang-long LI,De-rong SHEN,Tie-zheng NIE,Yue KOU.Learning query optimization method based on multi model outside database[J].Journal of Zhejiang University(Engineering Science),2022,56(2):288-296.
Authors:Guang-long LI  De-rong SHEN  Tie-zheng NIE  Yue KOU
Abstract:For AI and database optimization problems, existing technologies need to change the bottom layer of database, which affects the application of research results and lacks scalability. A learning query optimization method for non-embedded database was proposed. In the cardinality estimation stage, the multi-model method is used to establish a neural network for specific sub queries and train different sub models independently, which solves the problem of too many training sets and poor scalability. In the join optimization stage, cost-based reinforcement learning is applied to improve the query optimization performance. For each query, the optimization processes from cardinality estimation to connection sorting are executed outside the database. The query is rewritten according to the obtained optimization strategy, and the rewriting results are returned to the database. The query is executed according to the specified plan by setting parameters. Experimental verification was carried out on the data set containing eight tables. Compared with the query not optimized, the optimization method of non-embedded database has good optimization effect.
Keywords:query optimization  cardinality estimation  join order  neural network  reinforcement learning  
点击此处可从《浙江大学学报(自然科学版 )》浏览原始摘要信息
点击此处可从《浙江大学学报(自然科学版 )》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号