Lune

VLDB2024Top-tier venue

Efficient Enumeration of Recursive Plans in Transformation-based Query Optimizers

Amela Fejza, Pierre Genevès, Nabil Layaïda

Abstract

Query optimizers built on the transformation-based Volcano/Cascades framework are used in many database systems. Transformations proposed earlier on the logical query dag (LQDAG) data structure, which is key in such a framework, are restricted to recursion-free queries. We propose the recursive logical query dag (RLQDAG) which extends the LQDAG with the ability to capture and transform recursive queries, leveraging recent developments in recursive relational algebra. Specifically, this extension includes: (i) the ability of capturing and transforming sets of recursive relational terms thanks to (ii) annotated equivalence nodes used for guiding transformations that are more complex in the presence of recursion; and (iii) RLQDAG rewrite rules that transform sets of subterms in a grouped manner, instead of transforming individual terms in a sequential manner; and that (iv) incrementally update the necessary annotations. Core concepts of the RLQDAG are formalized using a syntax and formal semantics with a particular focus on subterm sharing and recursion. The result is a clean generalization of the LQDAG transformation-based approach, enabling more efficient explorations of plan spaces for recursive queries. An implementation of the proposed approach shows significant performance gains compared to the state-of-the-art.

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.

1 top-tier paper has 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

  • Optimizing Tensor Programs on Flexible Storage cites SPORES: Sum-Product Optimization via Relational Equality Saturation for Large Scale Linear Algebra
  • Optimizing Tensor Programs on Flexible Storage cites egg: Fast and extensible equality saturation
  • egg: Fast and extensible equality saturation cites SPORES: Sum-Product Optimization via Relational Equality Saturation for Large Scale Linear Algebra
  • ReSequel: Robust LLM-assisted Query Rewriting and Optimization using Templatization and Sampling cites SPORES: Sum-Product Optimization via Relational Equality Saturation for Large Scale Linear Algebra
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. ReSequel: Robust LLM-assisted Query Rewriting and Optimization using Templatization and SamplingSaeed Fathollahzadeh, Essam Mansour, Matthias BoehmVLDB 2026

Builds on4

  1. egg: Fast and extensible equality saturationMax Willsey, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt et al.POPL 2021 · 170 citations
  2. On the Optimization of Recursive Relational Queries: Application to Graph QueriesLouis Jachiet, Pierre Genevès, Nils Gesbert, Nabil LayaïdaSIGMOD 2020 · 31 citations
  3. Optimizing Tensor Programs on Flexible StorageMaximilian Schleich, Amir Shaikhha, Dan SuciuSIGMOD 2023 · 21 citations
  4. SPORES: Sum-Product Optimization via Relational Equality Saturation for Large Scale Linear AlgebraYisu Remy Wang, Shana Hutchison, Dan Suciu, Bill Howe et al.VLDB 2020

Related papers

  1. FlowLog: Efficient and Extensible Datalog via IncrementalityHangdong Zhao, Zhenghong Yu, Srinag Rao, Simon Frisk et al.VLDB 2026
  2. Adaptive Recursive Query OptimizationAnna Herlihy, Guillaume Martres, Anastasia Ailamaki, Martin OderskyICDE 2024 · 5 citations
  3. A Compiler for Fused Relational Operations on MultisetsJames Dong, Fredrik KjolstadPLDI 2026
  4. Interactive Debugging of Datalog ProgramsAndré Pacak, Sebastian ErdwegOOPSLA 2023 · 4 citations
  5. StarfishDB: A Query Execution Engine for Relational Probabilistic ProgrammingOuael Ben Amara, Sami Hadouaj, Niccolò MeneghettiSIGMOD 2024 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines