Query rewriting is essential for database performance optimization, but existing automated rule enumeration methods suffer from exponential search spaces, severe redundancy, and poor scalability, especially when handling complex query plans with five or more nodes, where a node represents an operator in the plan tree. We present SLER, a scalable system that enables efficient and effective rewrite rule discovery by combining standardized template enumeration with a learning to rank approach. SLER uses standardized templates, abstractions of query plans with operator structures preserved but data specific details removed, to eliminate structural redundancies and drastically reduce the search space. A learn to rank model guides enumeration by pre filtering the most promising template pairs, enabling scalable rule generation for large node templates. Evaluated on over 11000 real world SQL queries from both open source and commercial workloads, SLER has automatically constructed a rewrite rule repository exceeding 1 million rules - the largest empirically validated rewrite rule library to date. Notably, at the scale of one million rules, SLER supports query plan templates with complexity up to channel level depth. This unprecedented scale opens the door to discovering highly intricate transformations across diverse query patterns. Critically, SLER's template driven design and learned ranking mechanism are inherently extensible, allowing seamless integration of new and complex operators, paving the way for next generation optimizers powered by comprehensive, adaptive rule spaces.


翻译:查询重写对于数据库性能优化至关重要,但现有的自动化规则枚举方法面临指数级搜索空间、严重冗余及可扩展性不足等问题,尤其在处理包含五个及以上节点(节点代表计划树中的运算符)的复杂查询计划时。本文提出SLER,一个通过结合标准化模板枚举与学习排序方法实现高效重写规则发现的可扩展系统。SLER采用标准化模板(保留运算符结构但移除数据具体细节的查询计划抽象表示)以消除结构冗余,从而大幅缩减搜索空间。通过学习排序模型对最具潜力的模板对进行预筛选来指导枚举过程,实现了针对大型节点模板的可扩展规则生成。基于开源与商业工作负载中超过11000条真实SQL查询的评估表明,SLER已自动构建了包含超过100万条重写规则的规则库——这是迄今规模最大的经实证验证的重写规则库。值得注意的是,在百万规则量级上,SLER支持复杂度高达通道级深度的查询计划模板。这一前所未有的规模为发现跨多样查询模式的高度复杂转换开启了可能。关键的是,SLER的模板驱动设计与学习排序机制具备内在可扩展性,能够无缝集成新型复杂运算符,为构建基于全面自适应规则空间的下一代优化器铺平了道路。

0
下载
关闭预览

相关内容

智能数据库学习型索引研究综述
专知会员服务
23+阅读 · 2023年1月14日
【SIGIR2020】学习词项区分性,Learning Term Discrimination
专知会员服务
16+阅读 · 2020年4月28日
Query 理解和语义召回在知乎搜索中的应用
DataFunTalk
25+阅读 · 2020年1月2日
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
VIP会员
最新内容
具身AI安全综述:风险、攻击与防御
专知会员服务
1+阅读 · 32分钟前
DeepSeek 版Claude Code,免费小白安装教程来了!
专知会员服务
11+阅读 · 5月5日
《美空军条令出版物 2-0:情报(2026版)》
专知会员服务
14+阅读 · 5月5日
帕兰提尔 Gotham:一个游戏规则改变器
专知会员服务
9+阅读 · 5月5日
【综述】 机器人学习中的世界模型:全面综述
专知会员服务
14+阅读 · 5月4日
伊朗的导弹-无人机行动及其对美国威慑的影响
相关VIP内容
智能数据库学习型索引研究综述
专知会员服务
23+阅读 · 2023年1月14日
【SIGIR2020】学习词项区分性,Learning Term Discrimination
专知会员服务
16+阅读 · 2020年4月28日
相关资讯
Query 理解和语义召回在知乎搜索中的应用
DataFunTalk
25+阅读 · 2020年1月2日
相关基金
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员