QueryBooster: Improving SQL Performance Using Middleware Services for Human-Centered Query Rewriting
Abstract
SQL query performance is critical in database applications, and query rewriting is a technique that transforms an original query into an equivalent query with a better performance. In a wide range of database-supported systems, there is a unique problem where both the application and database layer are black boxes, and the developers need to use their knowledge about the data and domain to rewrite queries sent from the application to the database for better performance. Unfortunately, existing solutions do not give the users enough freedom to express their rewriting needs. To address this problem, we propose QueryBooster, a novel middleware-based service architecture for human-centered query rewriting, where users can use its expressive and easy-to-use rule language (called VarSQL) to formulate rewriting rules based on their needs. It also allows users to express rewriting intentions by providing examples of the original query and its rewritten query. QueryBooster automatically generalizes them to rewriting rules and suggests high-quality ones. We conduct a user study to show the benefits of VarSQL to formulate rewriting rules. Our experiments on real and synthetic workloads show the effectiveness of the rule-suggesting framework and the significant advantages of using QueryBooster for human-centered query rewriting to improve the end-to-end query performance.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- LLM-R2: A Large Language Model Enhanced Rule-based Rewrite System for Boosting Query Efficiency cites A Learned Query Rewrite System using Monte Carlo Tree Search
- LLM-R2: A Large Language Model Enhanced Rule-based Rewrite System for Boosting Query Efficiency cites WeTune: Automatic Discovery and Verification of Query Rewrite Rules
- Efficient Query Rewrite Rule Discovery via Standardized Enumeration and Learning-to-Rank cites LLM-R2: A Large Language Model Enhanced Rule-based Rewrite System for Boosting Query Efficiency
- Efficient Query Rewrite Rule Discovery via Standardized Enumeration and Learning-to-Rank cites A Learned Query Rewrite System using Monte Carlo Tree Search
- Efficient Query Rewrite Rule Discovery via Standardized Enumeration and Learning-to-Rank cites WeTune: Automatic Discovery and Verification of Query Rewrite Rules
- Efficient Query Rewrite Rule Discovery via Standardized Enumeration and Learning-to-Rank cites Bao: Making Learned Query Optimization Practical
- Cracking Query Bottlenecks: Towards Efficiency-Oriented Text-to-SQL Generation cites LLM-R2: A Large Language Model Enhanced Rule-based Rewrite System for Boosting Query Efficiency
- Cracking Query Bottlenecks: Towards Efficiency-Oriented Text-to-SQL Generation cites WeTune: Automatic Discovery and Verification of Query Rewrite Rules
- Dialect-Agnostic SQL Parsing via LLM-Based Segmentation cites LLM-R2: A Large Language Model Enhanced Rule-based Rewrite System for Boosting Query Efficiency
- Dialect-Agnostic SQL Parsing via LLM-Based Segmentation cites A Learned Query Rewrite System using Monte Carlo Tree Search
- Dialect-Agnostic SQL Parsing via LLM-Based Segmentation cites WeTune: Automatic Discovery and Verification of Query Rewrite Rules
- WeTune: Automatic Discovery and Verification of Query Rewrite Rules cites A Learned Query Rewrite System using Monte Carlo Tree Search
- ReSequel: Robust LLM-assisted Query Rewriting and Optimization using Templatization and Sampling cites LLM-R2: A Large Language Model Enhanced Rule-based Rewrite System for Boosting Query Efficiency
- ReSequel: Robust LLM-assisted Query Rewriting and Optimization using Templatization and Sampling cites A Learned Query Rewrite System using Monte Carlo Tree Search
- ReSequel: Robust LLM-assisted Query Rewriting and Optimization using Templatization and Sampling cites WeTune: Automatic Discovery and Verification of Query Rewrite Rules
Cited by top-tier papers5
- LLM-R2: A Large Language Model Enhanced Rule-based Rewrite System for Boosting Query EfficiencyZhaodonghui Li, Haitao Yuan, Huiming Wang, Gao Cong et al.VLDB 2025 · 52 citations
- Efficient Query Rewrite Rule Discovery via Standardized Enumeration and Learning-to-RankYuan Zhang, Yuxing Chen, Yuekun Yu, Jinbin Huang et al.ICDE 2026
- Cracking Query Bottlenecks: Towards Efficiency-Oriented Text-to-SQL GenerationLi Lin, Yunfeng Shen, Lingfeng Bao, Rongxin Wu et al.ISSTA 2026
- Dialect-Agnostic SQL Parsing via LLM-Based SegmentationJunwen An, Kabilan Mahathevan, Manuel RiggerSIGMOD 2026
- ReSequel: Robust LLM-assisted Query Rewriting and Optimization using Templatization and SamplingSaeed Fathollahzadeh, Essam Mansour, Matthias BoehmVLDB 2026
Builds on4
- Bao: Making Learned Query Optimization PracticalRyan Marcus, Parimarjan Negi, Hongzi Mao, Nesime Tatbul et al.SIGMOD 2021 · 242 citations
- A Learned Query Rewrite System using Monte Carlo Tree SearchXuanhe Zhou, Guoliang Li, Chengliang Chai, Jianhua FengVLDB 2022 · 85 citations
- WeTune: Automatic Discovery and Verification of Query Rewrite RulesZhaoguo Wang, Zhou Zhou, Yicun Yang, Haoran Ding et al.SIGMOD 2022 · 35 citations
- Shedding Light on Opaque Application QueriesKapil Khurana, Jayant R. HaritsaSIGMOD 2021 · 3 citations
Related papers
- ARG: Testing Query Rewriters via Abstract Rule Guided FuzzingDawei Li, Yuxiao Guo, Qifan Liu, Jie Liang et al.ASE 2025
- SlabCity: Whole-Query Optimization using Program SynthesisRui Dong, Jie Liu, Yuxuan Zhu, Cong Yan et al.VLDB 2023 · 11 citations
- GenRewrite: Query Rewriting via Large Language ModelsJie Liu, Barzan MozafariSIGMOD 2026 · 27 citations
- RaFe: Ranking Feedback Improves Query Rewriting for RAGShengyu Mao, Yong Jiang, Boli Chen, Xiao Li et al.EMNLP Findings 2024 · 19 citations
- Enhancing Conversational Search: Large Language Model-Aided Informative Query RewritingFanghua Ye, Meng Fang, Shenghui Li, Emine YilmazEMNLP Findings 2023 · 35 citations
