How I Learned to Stop Worrying and Love Re-optimization
Matthew Perron, Zeyuan Shang, Tim Kraska, Michael Stonebraker

TL;DR
This paper advocates for re-optimization in database query planning, showing it can significantly improve performance of slow queries and close the gap caused by estimation errors.
Contribution
It demonstrates that simple re-optimization mechanisms can substantially enhance query latency, achieving near-perfect performance without complex model improvements.
Findings
Re-optimization improves the latency of poorly performing queries.
Re-optimization reduces the top 20 longest query runtimes by 27%.
It achieves most benefits of perfect cardinality estimation.
Abstract
Cost-based query optimizers remain one of the most important components of database management systems for analytic workloads. Though modern optimizers select plans close to optimal performance in the common case, a small number of queries are an order of magnitude slower than they could be. In this paper we investigate why this is still the case, despite decades of improvements to cost models, plan enumeration, and cardinality estimation. We demonstrate why we believe that a re-optimization mechanism is likely the most cost-effective way to improve end-to-end query performance. We find that even a simple re-optimization scheme can improve the latency of many poorly performing queries. We demonstrate that re-optimization improves the end-to-end latency of the top 20 longest running queries in the Join Order Benchmark by 27%, realizing most of the benefit of perfect cardinality…
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 · Data Management and Algorithms · Constraint Satisfaction and Optimization
