Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive Queries

11/13/2019
by   Nikolaos Tziavelis, et al.
0

We study ranked enumeration of the results to a join query in order of decreasing importance, as imposed by an appropriate ranking function. Our main contribution is a framework for ranked enumeration over a class of Dynamic Programming problems that generalizes seemingly different problems that to date had been studied in isolation. To this end, we study and extend classic algorithms that find the k-shortest paths in a weighted graph. For full conjunctive queries, including cyclic ones, our approach is asymptotically optimal in terms of (1) time to return the top result, (2) delay between results, and (3) time until all results are returned in order. These optimality properties were derived for a complexity measure that has been widely used in the context of worst-case optimal join algorithms, but which abstracts away factors that only depend on query size and a polylogarithmic cost factor in input size. By performing a more detailed cost analysis, we are able to uncover a previously unknown tradeoff between two incomparable enumeration approaches: one has lower complexity when the number of returned results is small, the other when it is large. We demonstrate theoretically and empirically the superiority of our techniques to batch algorithms that produce the full result and then sort it. Interestingly, our technique is not only faster for returning the first few results, but even when all results are produced.

READ FULL TEXT

page 1

page 2

page 3

page 4

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/01/2020

Optimal Join Algorithms Meet Top-k

Top-k queries have been studied intensively in the database community an...
research
01/28/2021

Beyond Equi-joins: Ranking, Enumeration and Factorization

We study full acyclic join queries with general join predicates that inv...
research
02/07/2019

Ranked Enumeration of Conjunctive Query Results

We investigate the enumeration of top-k answers for conjunctive queries ...
research
10/15/2020

Ranked enumeration of MSO logic on words

In the last years, enumeration algorithms with bounded delay have attrac...
research
09/26/2019

Box Covers and Domain Orderings for Beyond Worst-Case Join Processing

Recent beyond worst-case optimal join algorithms Minesweeper and its gen...
research
03/11/2019

Optimal Parallel Algorithms in the Binary-Forking Model

In this paper we develop optimal algorithms in the binary-forking model ...

Please sign up or login with your details

Forgot password? Click here to reset