Lune

SIGMOD2024Top-tier venue

Relational Algorithms for Top-k Query Evaluation

Qichen Wang, Qiyao Luo, Yilei Wang

Abstract

The evaluation of top-k conjunctive queries, a staple in business analysis, often requires evaluating the conjunctive query prior to filtering the top-k results, leading to a significant computational overhead within Database Management Systems (DBMSs). While efficient algorithms have been proposed, their integration into DBMSs remains arduous. We introduce relational algorithms, a paradigm where each algorithmic step is expressed by a relational operator. This allows the algorithm to be represented as a set of SQL queries, enabling easy deployment across different systems that support SQL. We introduce two novel relational algorithms, level-k and product-k, specifically designed for evaluating top-k conjunctive queries and demonstrate that level-k achieves optimal running time for top-k free-connex queries. Furthermore, these algorithms enable easy translation into an oblivious algorithm for secure query evaluations. The presented algorithms are not only theoretically optimal but also exhibit eminent efficiency in practice. The experiment results show significant improvements, with our rewritten SQL outperforming the baseline by up to 6 orders of magnitude. Moreover, our secure implementations not only achieve substantial speedup compared to the baseline with secure guarantees but even surpass those baselines that have no secure guarantees.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Succinct Structure Representations for Efficient Query Optimization cites Yannakakis+: Practical Acyclic Query Evaluation with Theoretical Guarantees
  • SECRECY: Secure collaborative analytics in untrusted clouds cites Efficient Oblivious Database Joins
  • SECRECY: Secure collaborative analytics in untrusted clouds cites Senate: A Maliciously-Secure MPC Platform for Collaborative Analytics
  • SECRECY: Secure collaborative analytics in untrusted clouds cites ABY3: A Mixed Protocol Framework for Machine Learning
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Yannakakis+: Practical Acyclic Query Evaluation with Theoretical GuaranteesQichen Wang, Bingnan Chen, Binyang Dai, Ke Yi et al.SIGMOD 2025 · 7 citations
  2. Succinct Structure Representations for Efficient Query OptimizationZhekai Jiang, Qichen Wang, Christoph KochSIGMOD 2026

Builds on15

  1. ABY3: A Mixed Protocol Framework for Machine LearningPayman Mohassel, Peter RindalCCS 2018 · 898 citations
  2. Senate: A Maliciously-Secure MPC Platform for Collaborative AnalyticsRishabh Poddar, Sukrit Kalra, Avishay Yanai, Ryan Deng et al.USENIX Security 2021 · 89 citations
  3. Efficient Oblivious Database JoinsSimeon Krastnikov, Florian Kerschbaum, Douglas StebilaVLDB 2020 · 57 citations
  4. SECRECY: Secure collaborative analytics in untrusted cloudsJohn Liagouris, Vasiliki Kalavri, Muhammad Faisal, Mayank VariaNSDI 2023 · 53 citations
  5. Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive QueriesNikolaos Tziavelis, Deepak Ajwani, Wolfgang Gatterbauer, Mirek Riedewald et al.VLDB 2020 · 45 citations

Related papers

  1. Computing the Difference of Conjunctive Queries EfficientlyXiao Hu, Qichen WangSIGMOD 2023 · 9 citations
  2. Secure Yannakakis: Join-Aggregate Queries over Private DataYilei Wang, Ke YiSIGMOD 2021 · 49 citations
  3. Conjunctive Queries with ComparisonsQichen Wang, Ke YiSIGMOD 2022 · 13 citations
  4. Differentially Oblivious Multi-way JoinZhiang Wu, Wei Dong, Xiao HuSIGMOD 2026
  5. External Merge Sort for Top-K Queries: Eager input filtering guided by histogramsYannis Chronis, Thanh Do, Goetz Graefe, Keith PetersSIGMOD 2020 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines