Poisson Sampling over Acyclic Joins
Liese Bekkers, Frank Neven, Lorrens Pantelis, Stijn Vansummeren
Abstract
We introduce the problem of Poisson sampling over joins: compute a sample of the result of a join query by conceptually performing a Bernoulli trial for each join tuple, using a non-uniform and tuple-specific probability. We propose an algorithm for Poisson sampling over acyclic joins that is nearly instance-optimal, running in time 𝑄 (|db| + k łog |db|) where |db| is the size of the input database, and k is the size of the resulting sample. Our algorithm hinges on two building blocks: (1) The construction of a random-access index that allows, given a number i , to randomly access the i -th join tuple without fully materializing the (possibly large) join result; (2) The probing of this index to construct the result sample. We study the engineering trade-offs required to make both components practical, focusing on their implementation in column stores, and identify best-performing alternatives for both. Our experiments show that this pair of alternatives significantly outperforms the repeated-Bernoulli-trial algorithm for Poisson sampling while also demonstrating that the random-access index by itself can be used to competively implement Yannakakis' acyclic join processing algorithm when no sampling is required. This shows that, as far a query engine design is concerned, it is possible to adopt a common basis for both classical acyclic join processing and Poisson sampling, both without regret compared to classical join and sampling 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.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext fcfe288a-adfa-44bb-a7e3-b80f9b444972Builds on7
- Cardinality Estimation in DBMS: A Comprehensive Benchmark EvaluationYuxing Han, Ziniu Wu, Peizhi Wu, Rong Zhu et al.VLDB 2022 · 169 citations
- Instance-Optimal Acyclic Join Processing Without Regret: Engineering the Yannakakis Algorithm in Column StoresLiese Bekkers, Frank Neven, Stijn Vansummeren, Yisu Remy WangVLDB 2025 · 14 citations
- Debunking the Myth of Join Ordering: Toward Robust SQL AnalyticsJunyi Zhao, Kai Su, Yifei Yang, Xiangyao Yu et al.SIGMOD 2025 · 13 citations
- Efficient Dynamic Weighted Set Sampling and Its ExtensionFangyuan Zhang, Mengxu Jiang, Sibo WangVLDB 2024 · 9 citations
- Avoiding Materialisation for Guarded Aggregate QueriesMatthias Lanzinger, Reinhard Pichler, Alexander SelzerVLDB 2025 · 7 citations
Related papers
- Yannakakis+: Practical Acyclic Query Evaluation with Theoretical GuaranteesQichen Wang, Bingnan Chen, Binyang Dai, Ke Yi et al.SIGMOD 2025 · 7 citations
- Reservoir Sampling over JoinsBinyang Dai, Xiao Hu, Ke YiSIGMOD 2024 · 6 citations
- PGMJoins: Random Join Sampling with Graphical ModelsAli Mohammadi Shanghooshabad, Meghdad Kurmanji, Qingzhi Ma, Michael Shekelyan et al.SIGMOD 2021 · 13 citations
- One Join Order Does Not Fit All: Reducing Intermediate Results with Per-Split Query PlansYujun He, Hangdong Zhao, Simon Frisk, Yifei Yang et al.VLDB 2026
- Query Optimization for Database-Returning QueriesSimon Rink, Jens DittrichSIGMOD 2026 · 1 citation
