Yannakakis +: Practical Acyclic Query Evaluation with Theoretical Guarantees

Acyclic conjunctive queries form the backbone of most analytical workloads and have been extensively studied from both theoretical and practical perspectives. However, a significant gap remains between theory and practice. While the 40-year-old Yannakakis algorithm offers strong theoretical guarantees, it has not been widely adopted in real systems due to its large hidden constant factors. In this paper, we strive to close this gap by proposing Yannakakis +, an improved version of the Yannakakis algorithm that achieves higher practical efficiency while preserving its theoretical guarantees. Yannakakis + reduces the number of semi-join operations and introduces aggregation pushdown into the Yannakakis algorithm, with newly designed plan enumeration techniques that combine the classical GYO algorithm with cost-based optimization. Our experiments show that Yannakakis + consistently outperforms the original Yannakakis algorithm and several recent improved variants, including Robust Predicate Transfer (RPT), Shredded Yannakakis (SYA) and Parachute, across a broad range of queries and datasets, with improvements of 1.2x to 35.8x on the JOB benchmark. Another nice feature of our new algorithm is that it generates a traditional DAG query plan consisting of standard relational operators. This design allows Yannakakis + to be easily integrated into any standard SQL engine. In addition to a rewrite-based implementation that enables seamless adoption in arbitrary database systems, we also built a dedicated prototype integrated into DuckDB v1.3. This integration enables more fine-grained performance optimizations. Experiments show that Yannakakis + delivers equivalent or better performance than the native query plans on 136 out of 145 tested queries, achieving an average speedup of 1.94x and a maximum speedup of >100,000x.

Authors

Institutions

Publication Details

Journal
ACM Transactions on Database Systems
Published
2026-11-25
DOI
https://doi.org/10.1145/3864373
Primary Topic
Advanced Database Systems and Queries
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Yannakakis +: Practical Acyclic Query Evaluation with Theoretical Guarantees

Ke Yi, Liang Lin, Qichen Wang, Binyang Dai et al.
ACM Transactions on Database Systems
Advanced Database Systems and Queries
article

Yannakakis +: Practical Acyclic Query Evaluation with Theoretical Guarantees

Ke Yi, Liang Lin, Qichen Wang, Binyang Dai, Feifei Li, Bingnan Chen
article en

Abstract

Acyclic conjunctive queries form the backbone of most analytical workloads and have been extensively studied from both theoretical and practical perspectives. However, a significant gap remains between theory and practice. While the 40-year-old Yannakakis algorithm offers strong theoretical guarantees, it has not been widely adopted in real systems due to its large hidden constant factors. In this paper, we strive to close this gap by proposing Yannakakis +, an improved version of the Yannakakis algorithm that achieves higher practical efficiency while preserving its theoretical guarantees. Yannakakis + reduces the number of semi-join operations and introduces aggregation pushdown into the Yannakakis algorithm, with newly designed plan enumeration techniques that combine the classical GYO algorithm with cost-based optimization. Our experiments show that Yannakakis + consistently outperforms the original Yannakakis algorithm and several recent improved variants, including Robust Predicate Transfer (RPT), Shredded Yannakakis (SYA) and Parachute, across a broad range of queries and datasets, with improvements of 1.2x to 35.8x on the JOB benchmark. Another nice feature of our new algorithm is that it generates a traditional DAG query plan consisting of standard relational operators. This design allows Yannakakis + to be easily integrated into any standard SQL engine. In addition to a rewrite-based implementation that enables seamless adoption in arbitrary database systems, we also built a dedicated prototype integrated into DuckDB v1.3. This integration enables more fine-grained performance optimizations. Experiments show that Yannakakis + delivers equivalent or better performance than the native query plans on 136 out of 145 tested queries, achieving an average speedup of 1.94x and a maximum speedup of >100,000x.

ACM Transactions on Database Systems
Nanyang Technological University (SG), Hong Kong University of Science and Technology (HK), Alibaba Group (China) (CN), University of Hong Kong (HK)
Advanced Database Systems and Queries
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon