Query optimization is a pivotal part of every database management system (DBMS) since it determines the efficiency of query execution. Numerous works have introduced Machine Learning (ML) techniques to cost modeling, cardinality estimation, and end-to-end learned optimizer, but few of them are proven practical due to long training time, lack of interpretability, and integration cost. A recent study provides a practical method to optimize queries by recommending per-query hints but it suffers from two inherited problems. First, it follows the regression framework to predict the absolute latency of each query plan, which is very challenging because the latencies of query plans for a certain query may span multiple orders of magnitude. Second, it requires training a model for each dataset, which restricts the application of the trained models in practice. In this paper, we propose COOOL to predict Cost Orders of query plans to cOOperate with DBMS by Learning-To-Rank. Instead of estimating absolute costs, COOOL uses ranking-based approaches to compute relative ranking scores of the costs of query plans. We show that COOOL is theoretically valid to distinguish query plans with different latencies. We implement COOOL on PostgreSQL, and extensive experiments on join-order-benchmark and TPC-H data demonstrate that COOOL outperforms PostgreSQL and state-of-the-art methods on single-dataset tasks as well as a unified model for multiple-dataset tasks. Our experiments also shed some light on why COOOL outperforms regression approaches from the representation learning perspective, which may guide future research.


翻译:查询优化是每个数据库管理系统(DBMS)的关键组成部分,因为它决定了查询执行效率。已有许多工作将机器学习技术引入成本建模、基数估计和端到端学习优化器,但由于训练时间长、缺乏可解释性以及集成成本高等问题,极少有方法被证明具有实用性。近期一项研究通过推荐逐查询提示来提供实用的查询优化方法,但该方法存在两个固有问题:首先,它采用回归框架预测每个查询计划的绝对延迟,这一任务极具挑战性,因为同一查询的不同查询计划的延迟可能跨越多个数量级;其次,它需要为每个数据集单独训练模型,这限制了训练模型在实际中的应用。本文提出COOOL(通过学习排序与DBMS协作预测查询计划成本顺序)方法。COOOL不直接估计绝对成本,而是采用基于排序的方法计算查询计划成本的相对排序分数。我们证明了COOOL在理论上能够有效区分具有不同延迟的查询计划。我们在PostgreSQL上实现了COOOL,并在join-order-benchmark和TPC-H数据集上进行了大量实验,结果表明:在单数据集任务中,COOOL优于PostgreSQL及现有最优方法;在多数据集任务中,COOOL可构建统一模型。我们的实验还从表示学习的角度揭示了COOOL优于回归方法的原因,这可为未来研究提供指导。

0
下载
关闭预览

相关内容

【ICDM2022教程】多目标优化与推荐,173页ppt
专知会员服务
47+阅读 · 2022年12月24日
【2022新书】高效深度学习,Efficient Deep Learning Book
专知会员服务
128+阅读 · 2022年4月21日
WWW2022 | Recommendation Unlearning
机器学习与推荐算法
0+阅读 · 2022年6月2日
CIKM2020推荐系统论文集合
机器学习与推荐算法
10+阅读 · 2020年10月13日
量化金融强化学习论文集合
专知
14+阅读 · 2019年12月18日
初学者系列:推荐系统Wide & Deep Learning详解
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
LibRec 精选:推荐系统的常用数据集
LibRec智能推荐
17+阅读 · 2019年2月15日
无监督元学习表示学习
CreateAMind
27+阅读 · 2019年1月4日
LibRec 精选:基于LSTM的序列推荐实现(PyTorch)
LibRec智能推荐
50+阅读 · 2018年8月27日
国家自然科学基金
2+阅读 · 2013年12月31日
国家自然科学基金
5+阅读 · 2013年12月31日
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
2+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
1+阅读 · 2010年12月31日
Arxiv
0+阅读 · 2023年5月26日
Arxiv
0+阅读 · 2023年5月24日
VIP会员
最新内容
《基于深度强化学习的反无人机技术研究》178页
“史诗怒火”行动与“AI中心战”模式的浮现
专知会员服务
8+阅读 · 6月10日
【CVPR2026教程】扩散模型的解析理解
专知会员服务
3+阅读 · 6月10日
马赛克战:俄乌战场透析
专知会员服务
16+阅读 · 6月10日
《利用人工智能增强军事决策》
专知会员服务
7+阅读 · 6月10日
《自动机器学习在军事数据耕耘法中的应用》
专知会员服务
9+阅读 · 6月10日
为何指挥所生存能力要求范式转变
专知会员服务
6+阅读 · 6月10日
打造“新蛛网”模式与高科技动员
专知会员服务
5+阅读 · 6月10日
“蛛网”行动一周年:远程无人机战争
专知会员服务
3+阅读 · 6月10日
相关VIP内容
【ICDM2022教程】多目标优化与推荐,173页ppt
专知会员服务
47+阅读 · 2022年12月24日
【2022新书】高效深度学习,Efficient Deep Learning Book
专知会员服务
128+阅读 · 2022年4月21日
相关资讯
WWW2022 | Recommendation Unlearning
机器学习与推荐算法
0+阅读 · 2022年6月2日
CIKM2020推荐系统论文集合
机器学习与推荐算法
10+阅读 · 2020年10月13日
量化金融强化学习论文集合
专知
14+阅读 · 2019年12月18日
初学者系列:推荐系统Wide & Deep Learning详解
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
LibRec 精选:推荐系统的常用数据集
LibRec智能推荐
17+阅读 · 2019年2月15日
无监督元学习表示学习
CreateAMind
27+阅读 · 2019年1月4日
LibRec 精选:基于LSTM的序列推荐实现(PyTorch)
LibRec智能推荐
50+阅读 · 2018年8月27日
相关基金
国家自然科学基金
2+阅读 · 2013年12月31日
国家自然科学基金
5+阅读 · 2013年12月31日
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
2+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
1+阅读 · 2010年12月31日
Top
微信扫码咨询专知VIP会员