Making Databases Faster with LLM Evolutionary Sampling
Mehmet Hamza Erol, Xiangpeng Hao, Federico Bianchi, Ciro Greco, Jacopo Tagliabue, James Zou

TL;DR
This paper introduces a novel approach to query optimization that leverages large language models and evolutionary search to identify semantic-aware physical plan improvements, achieving significant speedups.
Contribution
It presents a new method combining LLMs and evolutionary algorithms for database query optimization, capturing semantic correlations often missed by traditional heuristics.
Findings
Achieved up to 4.78× speedups on some queries.
Demonstrated effective transfer of optimizations from small to large databases.
Showcased the ability of LLMs to identify non-obvious plan improvements.
Abstract
Traditional query optimization relies on cost-based optimizers that estimate execution cost (e.g., runtime, memory, and I/O) using predefined heuristics and statistical models. Improving these heuristics requires substantial engineering effort, and even when implemented, these heuristics often cannot take into account semantic correlations in queries and schemas that could enable better physical plans. Using our DBPlanBench harness for the DataFusion engine, we expose the physical plan through a compact serialized representation and let the LLM propose localized edits that can be applied and executed. We then apply an evolutionary search over these edits to refine candidates across iterations. Our key insight is that LLMs can leverage semantic knowledge to identify and apply non-obvious optimizations, such as join orderings that minimize intermediate cardinalities. We obtain up to…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Database Systems and Queries · Semantic Web and Ontologies · Cloud Computing and Resource Management
