SlabCity: Whole-Query Optimization using Program Synthesis

SlabCity: Whole-Query Optimization using Program Synthesis
复制标题

DOI:
10.14778/3611479.3611515
复制
发表时间:
2023-07
期刊:
Proc. VLDB Endow.
影响因子:
--
通讯作者:
Rui Dong;Jie Liu-;Yuxuan Zhu;Cong Yan;Barzan Mozafari;Xinyu Wang
Rui Dong;Jie Liu-;Yuxuan Zhu;Cong Yan;Barzan Mozafari;Xinyu Wang
中科院分区:
其他
文献类型:
--
作者:
Rui Dong;Jie Liu-;Yuxuan Zhu;Cong Yan;Barzan Mozafari;Xinyu Wang

文献摘要

相似文献

查询重写通常是有效查询优化的先决条件,特别是对于编写不良的查询。关于查询重写的先前工作依赖于基于句法模式匹配的一组“规则”。无论是依靠手动规则还是自动生成规则,基于规则的查询重写者本质上都受到处理新查询模式的能力。他们的成功受到提供给他们规则的质量和数量的限制。据我们所知,我们介绍了第一个基于合成的查询重写技术,即能够全面优化的Slabcity,而无需依赖任何重写规则。 Slabcity使用新型查询综合算法直接搜索SQL查询的空间,该算法利用了一个称为查询数据流的新概念。我们在四个工作负载上评估了Slabcity,其中包括具有1000多个现实生活查询的新策划的基准测试。我们表明,不仅可以比最先进的查询重写技术优化更优化的查询,而且有趣的是,它还导致查询的速度明显快于基于规则的系统生成的查询。
Query rewriting is often a prerequisite for effective query optimization, particularly for poorly-written queries. Prior work on query rewriting has relied on a set of "rules" based on syntactic pattern-matching. Whether relying on manual rules or auto-generated ones, rule-based query rewriters are inherently limited in their ability to handle new query patterns. Their success is limited by the quality and quantity of the rules provided to them. To our knowledge, we present the first synthesis-based query rewriting technique, SlabCity, capable of whole-query optimization without relying on any rewrite rules. SlabCity directly searches the space of SQL queries using a novel query synthesis algorithm that leverages a new concept called query dataflows. We evaluate SlabCity on four workloads, including a newly curated benchmark with more than 1000 real-life queries. We show that not only can SlabCity optimize more queries than state-of-the-art query rewriting techniques, but interestingly, it also leads to queries that are significantly faster than those generated by rule-based systems.