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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 67388d2a-6f9a-4f87-a269-274a804dd2c0Cited 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
- Accelerate Distributed Joins with Predicate TransferYifei Yang, Xiangyao YuSIGMOD 2025
- LinCQA: Faster Consistent Query Answering with Linear Time GuaranteesZhiwei Fan, Paraschos Koutris, Xiating Ouyang, Jef WijsenSIGMOD 2023 · 2 citations
