Lune

SIGMOD2021Top-tier venue

PGMJoins: Random Join Sampling with Graphical Models

Ali Mohammadi Shanghooshabad, Meghdad Kurmanji, Qingzhi Ma, Michael Shekelyan, Mehrdad Almasi, Peter Triantafillou

Abstract

Modern databases face formidable challenges when called to join (several) massive tables. Joins (especially when entailing many-to-many joins) are very time- and resource-consuming, join results can be too big to keep in memory, and performing analytics/learning tasks over them costs dearly in terms of time, resources, and money (in the cloud). Moreover, although random sampling is a promising idea to mitigate the above problems, the current state of the art leaves lots of room for improvements. With this paper we contribute a principled solution, coined PGMJoins. PGMJoins adapts Probabilistic Graphical Models to deriving provably random samples of the join result for (n-way) key joins, many-to-many joins, and cyclic and acyclic joins. PGMJoins contributes optimizations both for deriving the structure of the graph and for PGM inference. It also contributes a novel Sum-Product Message Passing Algorithm (SP-MPA) to make a uniform sample of the joint distribution (join result) efficiently and a novel way to deal with cyclic joins. Despite the use of PGMs, the learned joint distribution is not approximated, and the uniform samples are drawn from the true distribution. Our experimentation using queries and datasets from TPC-H, JOB, TPC-DS, and Twitter shows PGMJoins to outperform the state of the art (by 2X-28X).

Ask Lune

Know where this paper stands in minutes, not an afternoon.

Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.

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

Questions to start from

Lune can draw on

its abstract · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Machine Unlearning in Learned Databases: An Experimental Analysis cites Detect, Distill and Update: Learned DB Systems Facing Out of Distribution Data
  • Random Sampling Over Spatial Range Joins cites Learned Cardinality Estimation: An In-depth Study
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. Learned Cardinality Estimation: An In-depth StudyKyoungmin Kim, Jisung Jung, In Seo, Wook-Shin Han et al.SIGMOD 2022 · 51 citations
  2. JoinBoost: Grow Trees Over Normalized Data Using Only SQLZezhou Huang, Rathijit Sen, Jiaxiang Liu, Eugene WuVLDB 2023 · 23 citations
  3. Detect, Distill and Update: Learned DB Systems Facing Out of Distribution DataMeghdad Kurmanji, Peter TriantafillouSIGMOD 2023 · 19 citations
  4. Machine Unlearning in Learned Databases: An Experimental AnalysisMeghdad Kurmanji, Eleni Triantafillou, Peter TriantafillouSIGMOD 2024 · 12 citations
  5. Random Sampling Over Spatial Range JoinsDaichi AmagataICDE 2025 · 3 citations

Related papers

  1. Reservoir Sampling over JoinsBinyang Dai, Xiao Hu, Ke YiSIGMOD 2024 · 6 citations
  2. Towards Efficient Random-Order Enumeration for Join QueriesPengyu Chen, Zizheng Guo, Jianwei Yang, Dongjing MiaoVLDB 2026
  3. GenJoin: Conditional Generative Plan-to-Plan Query Optimizer that Learns from Subplan HintsPavel Sulimov, Claude Lehmann, Kurt StockingerSIGMOD 2026 · 3 citations
  4. Learning General Latent-Variable Graphical Models with Predictive Belief PropagationBorui Wang, Geoffrey J. GordonAAAI 2020 · 1 citation
  5. FactorJoin: A New Cardinality Estimation Framework for Join QueriesZiniu Wu, Parimarjan Negi, Mohammad Alizadeh, Tim Kraska et al.SIGMOD 2023 · 54 citations
Dusk over the sea between two cliffs drawn in fine vertical lines