Lune

SIGMOD2026顶会

Query Optimization for Database-Returning Queries

Simon Rink, Jens Dittrich

摘要

Recently, the novel concept of database-returning SQL queries (DRQs) was introduced. Instead of a single, (potentially) denormalized result table, DRQs return an entire subdatabase with a single SQL query. This subdatabase represents a subset of the original database, reduced to the relations, tuples, and attributes that contribute to the traditional join result. DRQs offer several benefits: they reduce network traffic in client-server settings, can lower memory requirements for materializing results, and significantly simplify querying hierarchical data. Currently, two state-of-the-art algorithms exist to compute DRQs: (1.) ResultDB Semi-Join builds upon Yannakakis' semi-join reduction algorithm by adding support for cyclic queries. (2.) ResultDB Decompose computes the standard single-table result and projects the result to the base tables to obtain the resulting subdatabase. However, multiple issues can be identified with these algorithms. First, ResultDB Semi-Join employs simple heuristics to greedily solve the underlying enumeration problems, often leading to suboptimal query plans. Second, each algorithm performs best under different conditions, so it is up to the user to choose the appropriate one for a given scenario. In this paper, we address these two issues. We propose two enumeration algorithms for ResultDB Semi-Join to handle the Root Node Enumeration Problem (RNEP) and the Tree Folding Enumeration Problem (TFEP). Further, we present a unified enumeration algorithm, TD ResultDB , to automatically decide between plans generated by our new enumeration algorithms for ResultDB Semi-Join and ResultDB Decompose . Through a comprehensive experimental evaluation, we show that the enumeration time overhead introduced by our methods remains minimal. Furthermore, by effectively solving the RNEP and TFEP, we achieve up to a 6x speed-up in query execution time for ResultDB textSemi-Join , whereas TD ResultDB consistently selects the best available plans.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Robust Join Processing with Diamond Hardened Joins 引用了 Accurate Summary-based Cardinality Estimation Through the Lens of Cardinality Estimation Graphs
  • Yannakakis+: Practical Acyclic Query Evaluation with Theoretical Guarantees 引用了 Robust Join Processing with Diamond Hardened Joins
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper6

  1. Accurate Summary-based Cardinality Estimation Through the Lens of Cardinality Estimation GraphsJeremy Chen, Yuqing Huang, Mushi Wang, Semih Salihoglu 等VLDB 2022 · 30 次引用
  2. Robust Join Processing with Diamond Hardened JoinsAltan Birler, Alfons Kemper, Thomas NeumannVLDB 2024 · 23 次引用
  3. Efficient Massively Parallel Join Optimization for Large QueriesRiccardo Mancini, Srinivas Karthik, Bikash Chandra, Vasilis Mageirakos 等SIGMOD 2022 · 21 次引用
  4. Efficiently Computing Join Orders with Heuristic SearchImmanuel Haffner, Jens DittrichSIGMOD 2023 · 8 次引用
  5. Yannakakis+: Practical Acyclic Query Evaluation with Theoretical GuaranteesQichen Wang, Bingnan Chen, Binyang Dai, Ke Yi 等SIGMOD 2025 · 7 次引用

相关 Paper

  1. Extending SQL to Return a SubdatabaseJoris Nix, Jens DittrichSIGMOD 2025
  2. Instance-Optimal Acyclic Join Processing Without Regret: Engineering the Yannakakis Algorithm in Column StoresLiese Bekkers, Frank Neven, Stijn Vansummeren, Yisu Remy WangVLDB 2025 · 14 次引用
  3. One Join Order Does Not Fit All: Reducing Intermediate Results with Per-Split Query PlansYujun He, Hangdong Zhao, Simon Frisk, Yifei Yang 等VLDB 2026
  4. Succinct Structure Representations for Efficient Query OptimizationZhekai Jiang, Qichen Wang, Christoph KochSIGMOD 2026
  5. Beyond Equi-joins: Ranking, Enumeration and FactorizationNikolaos Tziavelis, Wolfgang Gatterbauer, Mirek RiedewaldVLDB 2021 · 24 次引用
黄昏的海面,两侧是细线勾勒的悬崖