Ranked Enumeration of Join Queries with Projections

Shaleen Deep, Xiao Hu, Paraschos Koutris
1/14/2022
cs.DBcs.DS

Official code: shaleen/rankedenumprojections (4 stars, C++, last commit 2022-01-27).

Abstract

Join query evaluation with ordering is a fundamental data processing task in relational database management systems. SQL and custom graph query languages such as Cypher offer this functionality by allowing users to specify the order via the ORDER BY clause.

Show full abstract

In many scenarios, the users also want to see the first $k$ results quickly (expressed by the LIMIT clause), but the value of $k$ is not predetermined as user queries are arriving in an online fashion. Recent work has made considerable progress in identifying optimal algorithms for ranked enumeration of join queries that do not contain any projections. In this paper, we initiate the study of the problem of enumerating results in ranked order for queries with projections. Our main result shows that for any acyclic query, it is possible to obtain a near-linear (in the size of the database) delay algorithm after only a linear time preprocessing step for two important ranking functions: sum and lexicographic ordering. For a practical subset of acyclic queries known as star queries, we show an even stronger result that allows a user to obtain a smooth tradeoff between faster answering time guarantees using more preprocessing time. Our results are also extensible to queries containing cycles and unions. We also perform a comprehensive experimental evaluation to demonstrate that our algorithms, which are simple to implement, improve up to three orders of magnitude in the running time over state-of-the-art algorithms implemented within open-source RDBMS and specialized graph databases.

View on arXivView PDF

Code Implementations(1)

41C++, CMakeJan 17, 20224 years ago

Similar Papers

Cite this paper

@article{deep2022ranked,
  title  = {Ranked Enumeration of Join Queries with Projections},
  author = {Shaleen Deep and Xiao Hu and Paraschos Koutris},
  year   = {2022},
  eprint = {2201.05566},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2201.05566}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2201.05566.svg)](https://codeofpaper.com/paper/2201.05566)

Discussion