Beyond Equi-joins: Ranking, Enumeration and Factorization

01/28/2021
by   Nikolaos Tziavelis, et al.
0

We study full acyclic join queries with general join predicates that involve conjunctions and disjunctions of inequalities, focusing on ranked enumeration where the answers are returned incrementally in an order dictated by a given ranking function. Our approach offers strong time and space complexity guarantees in the standard RAM model of computation, getting surprisingly close to those of equi-joins. With n denoting the number of tuples in the database, we guarantee that for every value of k, the k top-ranked answers are returned in 𝒪(n polylog n + k log k) time and 𝒪(n polylog n + k) space. This is within a polylogarithmic factor of the best-known guarantee for equi-joins and even 𝒪(n + k), the time it takes to look at the input and output k answers. The key ingredient is an 𝒪(n polylog n)-size factorized representation of the query output, which is constructed on-the-fly for a given query and database. As a side benefit, our techniques are also applicable to unranked enumeration (where answers can be returned in any order) for joins with inequalities, returning k answers in 𝒪(n polylog n + k). This guarantee improves over the state of the art for large values of k. In an experimental study, we show that our ranked-enumeration approach is not only theoretically interesting, but also fast and memory-efficient in practice.

READ FULL TEXT

page 1

page 5

research
05/11/2022

Any-k Algorithms for Enumerating Ranked Answers to Conjunctive Queries

We study ranked enumeration for Conjunctive Queries (CQs) where the answ...
research
05/25/2023

Efficient Computation of Quantiles over Joins

We present efficient algorithms for Quantile Join Queries, abbreviated a...
research
11/13/2019

Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive Queries

We study ranked enumeration of the results to a join query in order of d...
research
01/14/2022

Ranked Enumeration of Join Queries with Projections

Join query evaluation with ordering is a fundamental data processing tas...
research
05/01/2020

Optimal Join Algorithms Meet Top-k

Top-k queries have been studied intensively in the database community an...
research
04/03/2023

Guaranteeing the Õ(AGM/OUT) Runtime for Uniform Sampling and OUT Size Estimation over Joins

We propose a new method for estimating the number of answers OUT of a sm...
research
02/07/2019

Ranked Enumeration of Conjunctive Query Results

We investigate the enumeration of top-k answers for conjunctive queries ...

Please sign up or login with your details

Forgot password? Click here to reset