Ranked Enumeration for Database Queries
Nikolaos Tziavelis, Wolfgang Gatterbauer, Mirek Riedewald

TL;DR
This paper introduces efficient ranked enumeration algorithms for database queries that return answers incrementally in order of importance, significantly improving speed over traditional methods and applicable to various ranking functions.
Contribution
It presents a simplified, practical algorithm for ranked enumeration in database queries, extending theoretical insights and connecting to shortest path problems.
Findings
Order-preserving algorithms achieve asymptotic speedups
Applicable to lexicographic and sum-based rankings
Simplified approach benefits implementation and optimization
Abstract
Ranked enumeration is a query-answering paradigm where the query answers are returned incrementally in order of importance (instead of returning all answers at once). Importance is defined by a ranking function that can be specific to the application, but typically involves either a lexicographic order (e.g., "ORDER BY R.A, S.B" in SQL) or a weighted sum of attributes (e.g., "ORDER BY 3*R.A + 2*S.B"). Recent work has introduced any-k algorithms for (multi-way) join queries, which push ranking into joins and avoid materializing intermediate results until necessary. The top-ranked answers are returned asymptotically faster than the common join-then-rank approach of database systems, resulting in orders-of-magnitude speedup in practice. In addition to their practical usefulness, these techniques complement a long line of theoretical research on unranked enumeration, where answers are also…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsData Management and Algorithms · Advanced Database Systems and Queries
