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.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper6
- Accurate Summary-based Cardinality Estimation Through the Lens of Cardinality Estimation GraphsJeremy Chen, Yuqing Huang, Mushi Wang, Semih Salihoglu 等VLDB 2022 · 被引用 30 次
- Robust Join Processing with Diamond Hardened JoinsAltan Birler, Alfons Kemper, Thomas NeumannVLDB 2024 · 被引用 23 次
- Efficient Massively Parallel Join Optimization for Large QueriesRiccardo Mancini, Srinivas Karthik, Bikash Chandra, Vasilis Mageirakos 等SIGMOD 2022 · 被引用 21 次
- Efficiently Computing Join Orders with Heuristic SearchImmanuel Haffner, Jens DittrichSIGMOD 2023 · 被引用 8 次
- Yannakakis+: Practical Acyclic Query Evaluation with Theoretical GuaranteesQichen Wang, Bingnan Chen, Binyang Dai, Ke Yi 等SIGMOD 2025 · 被引用 7 次
相关 Paper
- Extending SQL to Return a SubdatabaseJoris Nix, Jens DittrichSIGMOD 2025
- Instance-Optimal Acyclic Join Processing Without Regret: Engineering the Yannakakis Algorithm in Column StoresLiese Bekkers, Frank Neven, Stijn Vansummeren, Yisu Remy WangVLDB 2025 · 被引用 14 次
- One Join Order Does Not Fit All: Reducing Intermediate Results with Per-Split Query PlansYujun He, Hangdong Zhao, Simon Frisk, Yifei Yang 等VLDB 2026
- Succinct Structure Representations for Efficient Query OptimizationZhekai Jiang, Qichen Wang, Christoph KochSIGMOD 2026
- Beyond Equi-joins: Ranking, Enumeration and FactorizationNikolaos Tziavelis, Wolfgang Gatterbauer, Mirek RiedewaldVLDB 2021 · 被引用 24 次
