arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.04169cs.DB
收藏

通过标准化枚举和学习排序高效发现查询重写规则(扩展)

Efficient Query Rewrite Rule Discovery via Standardized Enumeration and Learning-to-Rank(extend)

Shenzhen Institute of Computing Science, Shenzhen University(深圳大学计算科学研究所);Tencent Inc.(腾讯公司)

Yuan Zhang, Yuxing Chen, Yuekun Yu, Jinbin Huang, Rui Mao, Anqun Pan, Lixiong Zheng, Jianbin Qin

AI总结:

SLER通过标准化枚举和学习排序方法,高效发现大规模查询重写规则,构建超过100万条规则的库,支持复杂查询计划模板。

摘要:

查询重写对于数据库性能优化至关重要,但现有的自动化规则枚举方法在处理具有五个或更多节点的复杂查询计划时,面临着指数级的搜索空间、严重的冗余性和较差的可扩展性。我们提出了SLER,一个可扩展的系统,通过结合标准化模板枚举与学习排序方法,实现了高效的重写规则发现。SLER利用标准化模板,这些模板是对查询计划的抽象,保留了操作符结构但去除了数据特定的细节,从而消除结构冗余并大幅减少搜索空间。学习排序模型通过预筛选最有前途的模板对来指导枚举,使大规模节点模板的规则生成成为可能。在超过11000个真实世界SQL查询上进行评估,SLER已自动构建了一个超过100万条规则的重写规则库——迄今为止经验验证最大的重写规则库。值得注意的是,在一百万条规则的规模下,SLER支持复杂度高达通道级别深度的查询计划模板。这种前所未有的规模为发现跨多种查询模式的复杂转换打开了大门。关键的是,SLER的模板驱动设计和学习排序机制本质上是可扩展的,允许无缝集成新的和复杂的操作符,为下一代由全面、适应性规则空间驱动的优化器铺平道路。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑