Lune

VLDB2021Top-tier venue

Beyond Equi-joins: Ranking, Enumeration and Factorization

Nikolaos Tziavelis, Wolfgang Gatterbauer, Mirek Riedewald

Abstract

We study theta-joins in general and join predicates with conjunctions and disjunctions of inequalities in particular, focusing on ranked enumeration where the answers are returned incrementally in an order dictated by a given ranking function. Our approach achieves strong time and space complexity properties: with 𝑛 denoting the number of tuples in the database, we guarantee for acyclic full join queries with inequality conditions that for every value of 𝑘, the 𝑘 top-ranked answers are returned in O (𝑛 polylog 𝑛 + 𝑘 log 𝑘) time. This is within a polylogarithmic factor of O (𝑛 + 𝑘 log 𝑘), i.e., the best known complexity for equi-joins, and even of O (𝑛 + 𝑘), i.e., the time it takes to look at the input and return 𝑘 answers in any order. Our guarantees extend to join queries with selections and many types of projections (namely those called "free-connex" queries and those that use bag semantics). Remarkably, they hold even when the number of join results is 𝑛 ℓ for a join of ℓ relations. The key ingredient is a novel O (𝑛 polylog 𝑛)-size factorized representation of the query output, which is constructed on-the-fly for a given query and database. In addition to providing the first nontrivial theoretical guarantees beyond equi-joins, we show in an experimental study that our ranked-enumeration approach is also memory-efficient and fast in practice, beating the running time of state-of-the-art database systems by orders of magnitude.

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.

6 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

  • Optimizing Queries with Many-to-Many Joins cites Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive Queries
  • Synthesizing Scoring Functions for Rankings Using Symbolic Gradient Descent cites Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive Queries
  • Ranked Enumeration of Join Queries with Projections cites Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive Queries
  • Worst-Case-Optimal Similarity Joins on Graph Databases cites Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive Queries
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. Ranked Enumeration of Join Queries with ProjectionsShaleen Deep, Xiao Hu, Paraschos KoutrisVLDB 2022 · 14 citations
  2. Conjunctive Queries with ComparisonsQichen Wang, Ke YiSIGMOD 2022 · 13 citations
  3. Optimizing Queries with Many-to-Many JoinsHasara Kalumin, Amol DeshpandeICDE 2025 · 3 citations
  4. Worst-Case-Optimal Similarity Joins on Graph DatabasesDiego Arroyuelo, Benjamin Bustos, Adrián Gómez-Brandón, Aidan Hogan et al.SIGMOD 2024 · 3 citations
  5. Synthesizing Scoring Functions for Rankings Using Symbolic Gradient DescentZixuan Chen, Panagiotis Manolios, Mirek RiedewaldICDE 2025 · 2 citations

Builds on3

  1. Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive QueriesNikolaos Tziavelis, Deepak Ajwani, Wolfgang Gatterbauer, Mirek Riedewald et al.VLDB 2020 · 45 citations
  2. Near-Optimal Distributed Band-Joins through Recursive PartitioningRundong Li, Wolfgang Gatterbauer, Mirek RiedewaldSIGMOD 2020 · 8 citations
  3. Factorized Graph Representations for Semi-Supervised Learning from Sparse DataKrishna Kumar P., Paul Langton, Wolfgang GatterbauerSIGMOD 2020 · 4 citations

Related papers

  1. Towards Efficient Random-Order Enumeration for Join QueriesPengyu Chen, Zizheng Guo, Jianwei Yang, Dongjing MiaoVLDB 2026
  2. Succinct Structure Representations for Efficient Query OptimizationZhekai Jiang, Qichen Wang, Christoph KochSIGMOD 2026
  3. A Scalable and Generic Approach to Range JoinsMaximilian Reif, Thomas NeumannVLDB 2022 · 6 citations
  4. Query Optimization for Database-Returning QueriesSimon Rink, Jens DittrichSIGMOD 2026 · 1 citation
  5. Reservoir Sampling over JoinsBinyang Dai, Xiao Hu, Ke YiSIGMOD 2024 · 6 citations
Dusk over the sea between two cliffs drawn in fine vertical lines