Cargando…

Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive Queries

We study ranked enumeration of join-query results according to very general orders defined by selective dioids. Our main contribution is a framework for ranked enumeration over a class of dynamic programming problems that generalizes seemingly different problems that had been studied in isolation. T...

Descripción completa

Detalles Bibliográficos
Autores principales: Tziavelis, Nikolaos, Ajwani, Deepak, Gatterbauer, Wolfgang, Riedewald, Mirek, Yang, Xiaofeng
Formato: Online Artículo Texto
Lenguaje:English
Publicado: 2020
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7955775/
https://www.ncbi.nlm.nih.gov/pubmed/33717631
http://dx.doi.org/10.14778/3397230.3397250
_version_ 1783664312219336704
author Tziavelis, Nikolaos
Ajwani, Deepak
Gatterbauer, Wolfgang
Riedewald, Mirek
Yang, Xiaofeng
author_facet Tziavelis, Nikolaos
Ajwani, Deepak
Gatterbauer, Wolfgang
Riedewald, Mirek
Yang, Xiaofeng
author_sort Tziavelis, Nikolaos
collection PubMed
description We study ranked enumeration of join-query results according to very general orders defined by selective dioids. Our main contribution is a framework for ranked enumeration over a class of dynamic programming problems that generalizes seemingly different problems that had been studied in isolation. To this end, we extend classic algorithms that find the k-shortest paths in a weighted graph. For full conjunctive queries, including cyclic ones, our approach is optimal in terms of the time to return the top result and the delay between results. These optimality properties are derived for the widely used notion of data complexity, which treats query size as a constant. By performing a careful cost analysis, we are able to uncover a previously unknown trade-off between two incomparable enumeration approaches: one has lower complexity when the number of returned results is small, the other when the number is very large. We theoretically and empirically demonstrate the superiority of our techniques over batch algorithms, which produce the full result and then sort it. Our technique is not only faster for returning the first few results, but on some inputs beats the batch algorithm even when all results are produced.
format Online
Article
Text
id pubmed-7955775
institution National Center for Biotechnology Information
language English
publishDate 2020
record_format MEDLINE/PubMed
spelling pubmed-79557752021-03-13 Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive Queries Tziavelis, Nikolaos Ajwani, Deepak Gatterbauer, Wolfgang Riedewald, Mirek Yang, Xiaofeng Proceedings VLDB Endowment Article We study ranked enumeration of join-query results according to very general orders defined by selective dioids. Our main contribution is a framework for ranked enumeration over a class of dynamic programming problems that generalizes seemingly different problems that had been studied in isolation. To this end, we extend classic algorithms that find the k-shortest paths in a weighted graph. For full conjunctive queries, including cyclic ones, our approach is optimal in terms of the time to return the top result and the delay between results. These optimality properties are derived for the widely used notion of data complexity, which treats query size as a constant. By performing a careful cost analysis, we are able to uncover a previously unknown trade-off between two incomparable enumeration approaches: one has lower complexity when the number of returned results is small, the other when the number is very large. We theoretically and empirically demonstrate the superiority of our techniques over batch algorithms, which produce the full result and then sort it. Our technique is not only faster for returning the first few results, but on some inputs beats the batch algorithm even when all results are produced. 2020-05 /pmc/articles/PMC7955775/ /pubmed/33717631 http://dx.doi.org/10.14778/3397230.3397250 Text en This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
spellingShingle Article
Tziavelis, Nikolaos
Ajwani, Deepak
Gatterbauer, Wolfgang
Riedewald, Mirek
Yang, Xiaofeng
Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive Queries
title Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive Queries
title_full Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive Queries
title_fullStr Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive Queries
title_full_unstemmed Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive Queries
title_short Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive Queries
title_sort optimal algorithms for ranked enumeration of answers to full conjunctive queries
topic Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7955775/
https://www.ncbi.nlm.nih.gov/pubmed/33717631
http://dx.doi.org/10.14778/3397230.3397250
work_keys_str_mv AT tziavelisnikolaos optimalalgorithmsforrankedenumerationofanswerstofullconjunctivequeries
AT ajwanideepak optimalalgorithmsforrankedenumerationofanswerstofullconjunctivequeries
AT gatterbauerwolfgang optimalalgorithmsforrankedenumerationofanswerstofullconjunctivequeries
AT riedewaldmirek optimalalgorithmsforrankedenumerationofanswerstofullconjunctivequeries
AT yangxiaofeng optimalalgorithmsforrankedenumerationofanswerstofullconjunctivequeries