Reservoir Sampling over Joins
Binyang Dai, Xiao Hu, Ke Yi
Abstract
Sampling over joins is a fundamental task in large-scale data analytics. Instead of computing the full join results, which could be massive, a uniform sample of the join results would suffice for many purposes, such as answering analytical queries or training machine learning models. In this paper, we study the problem of how to maintain a random sample over joins while the tuples are streaming in. Without the join, this problem can be solved by some simple and classical reservoir sampling algorithms. However, the join operator makes the problem significantly harder, as the join size can be polynomially larger than the input. We present a new algorithm for this problem that achieves a near-linear complexity. The key technical components are a generalized reservoir sampling algorithm that supports a predicate, and a dynamic index for sampling over joins. We also conduct extensive experiments on both graph and relational data over various join queries, and the experimental results demonstrate significant performance improvement over the state of the art. CCS Concepts: • Theory of computation Ñ Sketching and sampling; • Information systems Ñ Join algorithms.
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.
Cited by top-tier papers4
- Random Sampling Over Spatial Range JoinsDaichi AmagataICDE 2025 · 3 citations
- Poisson Sampling over Acyclic JoinsLiese Bekkers, Frank Neven, Lorrens Pantelis, Stijn VansummerenSIGMOD 2026 · 1 citation
- Exploring Exploratory QueryingMarcelo Arenas, Enrico Franconi, Janik Hammerer, Olaf Hartig et al.VLDB 2025
- Secure Multi-Party Sampling over JoinsQiyao Luo, Quanqing Xu, Chuanhui YangVLDB 2026
Builds on4
- The LDBC Social Network Benchmark: Business Intelligence WorkloadGábor Szárnyas, Jack Waudby, Benjamin A. Steer, Dávid Szakállas et al.VLDB 2023 · 103 citations
- Change Propagation Without JoinsQichen Wang, Xiao Hu, Binyang Dai, Ke YiVLDB 2023 · 23 citations
- Efficient Join Synopsis Maintenance for Data WarehouseZhuoyue Zhao, Feifei Li, Yuxi LiuSIGMOD 2020 · 19 citations
- Maintaining Acyclic Foreign-Key Joins under UpdatesQichen Wang, Ke YiSIGMOD 2020 · 13 citations
Related papers
- GREAT: Generalized Reservoir Sampling based Triangle Counting Estimation over Streaming GraphsSiyue Wu, Dingming Wu, Sinhong Cheuk, Tsz Nam Chan et al.VLDB 2025
- Enabling Adaptive Sampling for Intra-Window Join: Simultaneously Optimizing Quantity and QualityXilin Tang, Feng Zhang, Shuhao Zhang, Yani Liu et al.SIGMOD 2025 · 1 citation
- Practical Dynamic Extension for Sampling IndexesDouglas B. Rumbaugh, Dong XieSIGMOD 2024 · 3 citations
- Towards Efficient Random-Order Enumeration for Join QueriesPengyu Chen, Zizheng Guo, Jianwei Yang, Dongjing MiaoVLDB 2026
- Efficient Streaming Algorithms for Graphlet SamplingYann Bourreau, Marco Bressan, T.-H. Hubert Chan, Qipeng Kuang et al.NeurIPS 2024 · 1 citation
