Towards Efficient Random-Order Enumeration for Join Queries
Pengyu Chen, Zizheng Guo, Jianwei Yang, Dongjing Miao
Abstract
In many data analysis pipelines, a basic and time-consuming process is to produce join results and feed them into downstream tasks. Numerous enumeration algorithms have been developed for this purpose. To be a statistically meaningful representation of the whole join result, the result tuples are required to be enumerated in uniformly random order. However, existing studies lack an efficient random-order enumeration algorithm with a worst-case runtime guarantee for (cyclic) join queries. In this paper, we study the problem of enumerating the results of a join query in random order. We develop an efficient random-order enumeration algorithm for join queries with no large hidden constants in its complexity, achieving expected delay, total running time after -time index construction, where is the size of input, is the AGM bound, and is the size of the join result. We prove that our algorithm is near-optimal in the worst case, under the combinatorial -clique hypothesis. Our algorithm requires no query-specific preprocessing and can be flexibly adapted to many common database indexes with only minor modifications. We also devise two non-trivial techniques to speed up the enumeration, and provide an experimental study on our enumeration algorithm along with the speed-up techniques. The experimental results show that our algorithm, enhanced with the proposed techniques, significantly outperforms existing state-of-the-art methods.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 0d2ce921-0c43-4685-a3ee-12c9fe10104eBuilds on1
Related papers
- Ranked Enumeration of Join Queries with ProjectionsShaleen Deep, Xiao Hu, Paraschos KoutrisVLDB 2022 · 14 citations
- Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive QueriesNikolaos Tziavelis, Deepak Ajwani, Wolfgang Gatterbauer, Mirek Riedewald et al.VLDB 2020 · 45 citations
- Beyond Equi-joins: Ranking, Enumeration and FactorizationNikolaos Tziavelis, Wolfgang Gatterbauer, Mirek RiedewaldVLDB 2021 · 24 citations
- Efficiently Computing Join Orders with Heuristic SearchImmanuel Haffner, Jens DittrichSIGMOD 2023 · 8 citations
- Reservoir Sampling over JoinsBinyang Dai, Xiao Hu, Ke YiSIGMOD 2024 · 6 citations
