A Formalization of Top-Down Unnesting
Thomas Neumann

TL;DR
This paper formalizes the process of top-down unnesting in SQL queries, providing a rigorous proof of correctness for an algorithm that simplifies correlated subqueries for more efficient evaluation.
Contribution
It introduces a formal framework and proof for the correctness of a top-down unnesting algorithm in SQL query optimization.
Findings
Formal semantics for unnesting operator
Proof of correctness for the unnesting algorithm
Enhances understanding of query optimization techniques
Abstract
When writing SQL queries, it is often convenient to use correlated subqueries. However, for the database engine, these correlated queries are very difficult to evaluate efficiently. The query optimizer will therefore try to eliminate the correlations, a process referred to as unnesting. Recent work has introduced a single pass top-down algorithm for unnesting arbitrary SQL queries. That work did not include a formal proof of correctness, though. In this work we provide the missing formalization by formally defining the operator semantics and proving that the unnesting algorithm is correct.
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 Quality and Management · Semantic Web and Ontologies
