SlabCity: Whole-Query Optimization using Program Synthesis
Rui Dong, Jie Liu, Yuxuan Zhu, Cong Yan, Barzan Mozafari, Xinyu Wang
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Geo: A Query Rewrite Framework for Graph Pattern Mining 引用了 A Learned Query Rewrite System using Monte Carlo Tree Search
- Geo: A Query Rewrite Framework for Graph Pattern Mining 引用了 WeTune: Automatic Discovery and Verification of Query Rewrite Rules
- GenRewrite: Query Rewriting via Large Language Models 引用了 A Learned Query Rewrite System using Monte Carlo Tree Search
- GenRewrite: Query Rewriting via Large Language Models 引用了 WeTune: Automatic Discovery and Verification of Query Rewrite Rules
- Learned Offline Query Planning via Bayesian Optimization 引用了 Balsa: Learning a Query Optimizer Without Expert Demonstrations
- Learned Offline Query Planning via Bayesian Optimization 引用了 A Learned Query Rewrite System using Monte Carlo Tree Search
- WeTune: Automatic Discovery and Verification of Query Rewrite Rules 引用了 A Learned Query Rewrite System using Monte Carlo Tree Search
- WeTune: Automatic Discovery and Verification of Query Rewrite Rules 引用了 SQLCheck: Automated Detection and Diagnosis of SQL Anti-Patterns
- ReSequel: Robust LLM-assisted Query Rewriting and Optimization using Templatization and Sampling 引用了 GenRewrite: Query Rewriting via Large Language Models
- ReSequel: Robust LLM-assisted Query Rewriting and Optimization using Templatization and Sampling 引用了 A Learned Query Rewrite System using Monte Carlo Tree Search
- ReSequel: Robust LLM-assisted Query Rewriting and Optimization using Templatization and Sampling 引用了 WeTune: Automatic Discovery and Verification of Query Rewrite Rules
引用它的顶会 Paper4
- GenRewrite: Query Rewriting via Large Language ModelsJie Liu, Barzan MozafariSIGMOD 2026 · 27 次引用
- Learned Offline Query Planning via Bayesian OptimizationJeffrey Tao, Natalie Maus, Haydn Thomas Jones, Yimeng Zeng 等SIGMOD 2025 · 5 次引用
- Geo: A Query Rewrite Framework for Graph Pattern MiningNazanin Yousefian, Kasra Jamshidi, Keval Vora, Anders MiltnerOOPSLA 2026
- ReSequel: Robust LLM-assisted Query Rewriting and Optimization using Templatization and SamplingSaeed Fathollahzadeh, Essam Mansour, Matthias BoehmVLDB 2026
它引用的 Paper被引最多的 5 篇,共 9 篇
- Balsa: Learning a Query Optimizer Without Expert DemonstrationsZongheng Yang, Wei-Lin Chiang, Sifei Luan, Gautam Mittal 等SIGMOD 2022 · 99 次引用
- A Learned Query Rewrite System using Monte Carlo Tree SearchXuanhe Zhou, Guoliang Li, Chengliang Chai, Jianhua FengVLDB 2022 · 85 次引用
- Provenance-guided synthesis of Datalog programsMukund Raghothaman, Jonathan Mendelson, David Zhao, Mayur Naik 等POPL 2020 · 49 次引用
- WeTune: Automatic Discovery and Verification of Query Rewrite RulesZhaoguo Wang, Zhou Zhou, Yicun Yang, Haoran Ding 等SIGMOD 2022 · 35 次引用
- SQLCheck: Automated Detection and Diagnosis of SQL Anti-PatternsPrashanth Dintyala, Arpit Narechania, Joy ArulrajSIGMOD 2020 · 26 次引用
相关 Paper
- QueryBooster: Improving SQL Performance Using Middleware Services for Human-Centered Query RewritingQiushi Bai, Sadeem Alsudais, Chen LiVLDB 2023 · 14 次引用
- TACO: A Benchmark for Open-Domain Text-to-SQL with Ambiguous and Cross-Database QueriesChao Deng, Ju Fan, Yuyu Luo, Qinliang Xue 等VLDB 2026 · 1 次引用
- ARG: Testing Query Rewriters via Abstract Rule Guided FuzzingDawei Li, Yuxiao Guo, Qifan Liu, Jie Liang 等ASE 2025
- Efficient Query Rewrite Rule Discovery via Standardized Enumeration and Learning-to-RankYuan Zhang, Yuxing Chen, Yuekun Yu, Jinbin Huang 等ICDE 2026
- Synthesizing Document Database Queries Using Collection AbstractionsQikang Liu, Yang He, Yanwen Cai, Byeongguk Kwak 等ICSE 2025
