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
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

05/01/2020

Optimal Join Algorithms Meet Top-k

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

Beyond Equi-joins: Ranking, Enumeration and Factorization

We study full acyclic join queries with general join predicates that inv...
01/14/2022

Ranked Enumeration of Join Queries with Projections

Join query evaluation with ordering is a fundamental data processing tas...
02/07/2019

Ranked Enumeration of Conjunctive Query Results

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

Ranked enumeration of MSO logic on words

In the last years, enumeration algorithms with bounded delay have attrac...
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...
09/18/2017

Compressed Representations of Conjunctive Query Results

Relational queries, and in particular join queries, often generate large...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.