Efficient Computation of Quantiles over Joins

05/25/2023
by   Nikolaos Tziavelis, et al.
0

We present efficient algorithms for Quantile Join Queries, abbreviated as the median) under some ordering over the answers to a Join Query (JQ). Our goal is to avoid materializing the set of all join answers, and to achieve quasilinear time in the size of the database, regardless of the total number of answers. A recent dichotomy result rules out the existence of such an algorithm for a general family of queries and orders. Specifically, for acyclic JQs without self-joins, the problem becomes intractable for ordering by sum whenever we join more than two relations (and these joins are not trivial intersections). Moreover, even for basic ranking functions beyond sum, such as min or max over different attributes, so far it is not known whether there is any nontrivial tractable solving what we call a "pivot answer". The second subroutine partitions the space of query answers according to this pivot, and continues searching in one partition that is represented as new develop an algorithm that works for a large class of ranking functions that are appropriately monotone. The second subroutine requires a customized construction for the specific ranking function at hand. We show the benefit and generality of our approach by using it to establish several new complexity results. First, we prove the tractability of min and max for all acyclic JQs, thereby resolving the above question. Second, we extend the previous dichotomy for sum to all partial sums. Third, we handle the intractable cases of sum by devising a deterministic approximation scheme that applies to every acyclic JQ.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/28/2021

Beyond Equi-joins: Ranking, Enumeration and Factorization

We study full acyclic join queries with general join predicates that inv...
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
01/14/2022

Ranked Enumeration of Join Queries with Projections

Join query evaluation with ordering is a fundamental data processing tas...
research
12/22/2020

Tractable Orders for Direct Access to Ranked Answers of Conjunctive Queries

We study the question of when we can provide logarithmic-time direct acc...
research
04/09/2020

Computing Local Sensitivities of Counting Queries with Joins

Local sensitivity of a query Q given a database instance D, i.e. how muc...
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
10/21/2022

Unbalanced Triangle Detection and Enumeration Hardness for Unions of Conjunctive Queries

We study the enumeration of answers to Unions of Conjunctive Queries (UC...

Please sign up or login with your details

Forgot password? Click here to reset