Yannakakis + : Practical Acyclic Query Evaluation with Theoretical Guarantees
Bingnan Chen, Qichen Wang, Binyang Dai, Ke Yi, Feifei Li, Liang Lin
Key points
From the paper's conclusion- 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.
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Fast Matrix Multiplication for Database Query ProcessingACM SIGMOD Record · 2026
- Order-Dependent Complexity of Enumeration and Direct Access for Conjunctive Queries on Dynamic DataarXiv · 2026
- SAGE: A Unified Algebra and Self-Adaptive Execution for AI Functions in SQLarXiv · 2026
- Graph reachability queries: A unified multi-metric framework with dynamic evaluation and practical guidelinesWorld Wide Web · 2026
- Schema Retrieval with Embeddings and Vector Stores Using Retrieval-Augmented Generation and LLM-Based SQL Query GenerationApplied Sciences · 2026
- SEFRQO-Plus: a self-evolving query optimizer via large language models and retrieval-augmented generationThe VLDB Journal · 2026