Instance-Optimal Acyclic Join Processing Without Regret: Engineering the Yannakakis Algorithm in Column Stores
Liese Bekkers, Frank Neven, Stijn Vansummeren, Yisu Remy Wang
Abstract
Acyclic join queries can be evaluated instance-optimally using Yannakakis' algorithm, which avoids needlessly large intermediate results through semi-join passes. Recent work proposes to address the significant hidden constant factors arising from a naive implementation of Yannakakis by decomposing the hash join operator into two suboperators, called Lookup and Expand. In this paper, we present a novel method for integrating Lookup and Expand plans in interpreted environments, like column stores, formalizing them using Nested Semijoin Algebra (NSA) and implementing them through a shredding approach. We characterize the class of NSA expressions that can be evaluated instance-optimally as those that are 2-phase: no 'shrinking' operator is applied after an unnest (i.e., expand). We introduce Shredded Yannakakis (SYA), an evaluation algorithm for acyclic joins that, starting from a binary join plan, transforms it into a 2-phase NSA plan, and then evaluates it through the shredding technique. We show that SYA is provably robust (i.e., never produces large intermediate results) and without regret (i.e., is never worse than the binary join plan under a suitable cost model) on the class of well-behaved binary join plans. Our experiments on a suite of 1,849 queries show that SYA improves performance for 85.3% of the queries with speedups up to 62.5x, while remaining competitive on the other queries. We hope this approach offers a fresh perspective on Yannakakis' algorithm, helping system engineers better understand its practical benefits and facilitating its adoption into a broader spectrum of query engines.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Succinct Structure Representations for Efficient Query Optimization cites Robust Join Processing with Diamond Hardened Joins
- Succinct Structure Representations for Efficient Query Optimization cites Yannakakis+: Practical Acyclic Query Evaluation with Theoretical Guarantees
- Succinct Structure Representations for Efficient Query Optimization cites Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation
- Robust Join Processing with Diamond Hardened Joins cites Accurate Summary-based Cardinality Estimation Through the Lens of Cardinality Estimation Graphs
- Robust Join Processing with Diamond Hardened Joins cites Adopting Worst-Case Optimal Joins in Relational Database Systems
- Parachute: Single-Pass Bi-Directional Information Passing cites Robust Join Processing with Diamond Hardened Joins
- Yannakakis+: Practical Acyclic Query Evaluation with Theoretical Guarantees cites Robust Join Processing with Diamond Hardened Joins
- Yannakakis+: Practical Acyclic Query Evaluation with Theoretical Guarantees cites Adopting Worst-Case Optimal Joins in Relational Database Systems
- The Data World Is Not Flat: Efficient Factorized Execution for Relational Systems cites Accurate Summary-based Cardinality Estimation Through the Lens of Cardinality Estimation Graphs
- The Data World Is Not Flat: Efficient Factorized Execution for Relational Systems cites Robust Join Processing with Diamond Hardened Joins
- The Data World Is Not Flat: Efficient Factorized Execution for Relational Systems cites Adopting Worst-Case Optimal Joins in Relational Database Systems
- Poisson Sampling over Acyclic Joins cites Yannakakis+: Practical Acyclic Query Evaluation with Theoretical Guarantees
- Poisson Sampling over Acyclic Joins cites Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation
Cited by top-tier papers5
- Yannakakis+: Practical Acyclic Query Evaluation with Theoretical GuaranteesQichen Wang, Bingnan Chen, Binyang Dai, Ke Yi et al.SIGMOD 2025 · 7 citations
- Parachute: Single-Pass Bi-Directional Information PassingMihail Stoian, Andreas Zimmerer, Skander Krid, Amadou Ngom et al.VLDB 2025 · 6 citations
- Poisson Sampling over Acyclic JoinsLiese Bekkers, Frank Neven, Lorrens Pantelis, Stijn VansummerenSIGMOD 2026 · 1 citation
- Succinct Structure Representations for Efficient Query OptimizationZhekai Jiang, Qichen Wang, Christoph KochSIGMOD 2026
- The Data World Is Not Flat: Efficient Factorized Execution for Relational SystemsStefan Lehner, Thomas NeumannVLDB 2026
Builds on6
- Cardinality Estimation in DBMS: A Comprehensive Benchmark EvaluationYuxing Han, Ziniu Wu, Peizhi Wu, Rong Zhu et al.VLDB 2022 · 169 citations
- Adopting Worst-Case Optimal Joins in Relational Database SystemsMichael J. Freitag, Maximilian Bandle, Tobias Schmidt, Alfons Kemper et al.VLDB 2020 · 79 citations
- Accurate Summary-based Cardinality Estimation Through the Lens of Cardinality Estimation GraphsJeremy Chen, Yuqing Huang, Mushi Wang, Semih Salihoglu et al.VLDB 2022 · 30 citations
- Robust Join Processing with Diamond Hardened JoinsAltan Birler, Alfons Kemper, Thomas NeumannVLDB 2024 · 23 citations
- Scalable Querying of Nested DataJaclyn Smith, Michael Benedikt, Milos Nikolic, Amir ShaikhhaVLDB 2021 · 21 citations
Related papers
- One Join Order Does Not Fit All: Reducing Intermediate Results with Per-Split Query PlansYujun He, Hangdong Zhao, Simon Frisk, Yifei Yang et al.VLDB 2026
- Query Optimization for Database-Returning QueriesSimon Rink, Jens DittrichSIGMOD 2026 · 1 citation
- Secure Yannakakis: Join-Aggregate Queries over Private DataYilei Wang, Ke YiSIGMOD 2021 · 49 citations
- LinCQA: Faster Consistent Query Answering with Linear Time GuaranteesZhiwei Fan, Paraschos Koutris, Xiating Ouyang, Jef WijsenSIGMOD 2023 · 2 citations
- HoneyComb: A Parallel Worst-Case Optimal Join on MulticoresJiacheng Wu, Dan SuciuSIGMOD 2025 · 1 citation
