Lune

SIGMOD2025Top-tier venue

Debunking the Myth of Join Ordering: Toward Robust SQL Analytics

Junyi Zhao, Kai Su, Yifei Yang, Xiangyao Yu, Paraschos Koutris, Huanchen Zhang

Abstract

Join order optimization is critical in achieving good query performance. Despite decades of research and practice, modern query optimizers could still generate inferior join plans that are orders of magnitude slower than optimal. Existing research on robust query processing often lacks theoretical guarantees on join-order robustness while sacrificing query performance. In this paper, we rediscover the recent Predicate Transfer technique from a robustness point of view. We introduce two new algorithms, LargestRoot and SafeSubjoin, and then propose Robust Predicate Transfer (RPT) that is provably robust against arbitrary join orders of an acyclic query. We integrated Robust Predicate Transfer with DuckDB, a state-of-the-art analytical database, and evaluated against all the queries in TPC-H, JOB, TPC-DS, and DSB benchmarks. Our experimental results show that RPT improves join-order robustness by orders of magnitude compared to the baseline. With RPT, the largest ratio between the maximum and minimum execution time out of random join orders for a single acyclic query is only 1.6x (the ratio is close to 1 for most evaluated queries). Meanwhile, applying RPT also improves the end-to-end query performance by ≈1.5x (per-query geometric mean). We hope that this work sheds light on solving the practical join ordering problem.

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.

10 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Are We Ready For Learned Cardinality Estimation? cites Deep Learning Models for Selectivity Estimation of Multi-Attribute Queries
  • Are We Ready For Learned Cardinality Estimation? cites Deep Unsupervised Cardinality Estimation
  • Are We Ready For Learned Cardinality Estimation? cites NeuroCard: One Cardinality Estimator for All Tables
  • Robust Predicate Transfer with Dynamic Execution cites Are We Ready For Learned Cardinality Estimation?
  • Robust Predicate Transfer with Dynamic Execution cites Parachute: Single-Pass Bi-Directional Information Passing
  • Robust Predicate Transfer with Dynamic Execution cites Yannakakis+: Practical Acyclic Query Evaluation with Theoretical Guarantees
  • Robust Predicate Transfer with Dynamic Execution cites SQLStorm: Taking Database Benchmarking into the LLM Era
  • FLAT: Fast, Lightweight and Accurate Method for Cardinality Estimation cites Are We Ready For Learned Cardinality Estimation?
  • FLAT: Fast, Lightweight and Accurate Method for Cardinality Estimation cites NeuroCard: One Cardinality Estimator for All Tables
  • SQLStorm: Taking Database Benchmarking into the LLM Era cites Parachute: Single-Pass Bi-Directional Information Passing
  • SQLStorm: Taking Database Benchmarking into the LLM Era cites Yannakakis+: Practical Acyclic Query Evaluation with Theoretical Guarantees
  • NeuroCard: One Cardinality Estimator for All Tables cites Deep Unsupervised Cardinality Estimation
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers10

  1. SQLStorm: Taking Database Benchmarking into the LLM EraTobias Schmidt, Viktor Leis, Peter Boncz, Thomas NeumannVLDB 2025 · 21 citations
  2. Yannakakis+: Practical Acyclic Query Evaluation with Theoretical GuaranteesQichen Wang, Bingnan Chen, Binyang Dai, Ke Yi et al.SIGMOD 2025 · 7 citations
  3. Parachute: Single-Pass Bi-Directional Information PassingMihail Stoian, Andreas Zimmerer, Skander Krid, Amadou Ngom et al.VLDB 2025 · 6 citations
  4. QDBO: A Real-time Quantum-augmented Database System OptimizerHanwen Liu, Abhishek Kumar, Federico M. Spedalieri, Ibrahim SabekVLDB 2026 · 3 citations
  5. Robust Predicate Transfer with Dynamic ExecutionYiming Qiao, Peter Boncz, Huanchen ZhangVLDB 2026 · 2 citations

Builds on16

  1. Deep Unsupervised Cardinality EstimationZongheng Yang, Eric Liang, Amog Kamsetty, Chenggang Wu et al.VLDB 2020 · 206 citations
  2. Are We Ready For Learned Cardinality Estimation?Xiaoying Wang, Changbo Qu, Weiyuan Wu, Jiannan Wang et al.VLDB 2021 · 156 citations
  3. NeuroCard: One Cardinality Estimator for All TablesZongheng Yang, Amog Kamsetty, Sifei Luan, Eric Liang et al.VLDB 2021 · 138 citations
  4. FLAT: Fast, Lightweight and Accurate Method for Cardinality EstimationRong Zhu, Ziniu Wu, Yuxing Han, Kai Zeng et al.VLDB 2021 · 120 citations
  5. Deep Learning Models for Selectivity Estimation of Multi-Attribute QueriesShohedul Hasan, Saravanan Thirumuruganathan, Jees Augustine, Nick Koudas et al.SIGMOD 2020 · 101 citations

Related papers

  1. Accelerate Distributed Joins with Predicate TransferYifei Yang, Xiangyao YuSIGMOD 2025
  2. POLAR: Adaptive and Non-invasive Join Order Selection via Plans of Least ResistanceDavid Justen, Daniel Ritter, Campbell Fraser, Andrew Lamb et al.VLDB 2024 · 11 citations
  3. These Rows Are Made for Sorting and That's Just What We'll DoLaurens Kuiper, Hannes MühleisenICDE 2023 · 6 citations
  4. Saving Private Hash JoinLaurens Kuiper, Paul Gross, Peter Boncz, Hannes MühleisenVLDB 2025
  5. Selective Late Materialization in Modern Analytical DatabasesYihao Liu, Shaoxuan Tang, Yulong Hui, Hangrui Zhou et al.VLDB 2025
Dusk over the sea between two cliffs drawn in fine vertical lines