Lune

SIGMOD2020Top-tier venue

Maintaining Acyclic Foreign-Key Joins under Updates

Qichen Wang, Ke Yi

Abstract

A large number of analytical queries (e.g., all the 22 queries in the TPC-H benchmark) are based on acyclic foreign-key joins. In this paper, we study the problem of incrementally maintaining the query results of these joins under updates, i.e., insertion and deletion of tuples to any of the relations. Prior work has shown that this problem is inherently hard, requiring at least Ω(|db|1/2 -ε) time per update, where |db| is the size of the database, and ε > 0 can be any small constant. However, this negative result holds only on adversarially constructed update sequences; on the other hand, most real-world update sequences are "nice", nowhere near these worst-case scenarios. We introduce a measure λ, which we call the enclosureness of the update sequence, to more precisely characterize its intrinsic difficulty. We present an algorithm to maintain the query results of any acyclic foreign-key join in O(λ) time amortized, on any update sequence whose enclosureness is λ. This is complemented with a lower bound of Ω(λ1-ε), showing that our algorithm is essentially optimal with respect to λ. Next, using this algorithm as the core component, we show how all the 22 queries in the TPC-H benchmark can be supported in O(łambda) time. Finally, based on the algorithms developed, we built a continuous query processing system on top of Flink, and experimental results show that our system outperforms previous ones significantly.

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.

3 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

  • Reservoir Sampling over Joins cites Change Propagation Without Joins
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Change Propagation Without JoinsQichen Wang, Xiao Hu, Binyang Dai, Ke YiVLDB 2023 · 23 citations
  2. Efficient Incrementialization of Correlated Nested Aggregate Queries using Relative Partial Aggregate Indexes (RPAI)Supun Abeysinghe, Qiyang He, Tiark RompfSIGMOD 2022 · 7 citations
  3. Reservoir Sampling over JoinsBinyang Dai, Xiao Hu, Ke YiSIGMOD 2024 · 6 citations

Related papers

  1. Debunking the Myth of Join Ordering: Toward Robust SQL AnalyticsJunyi Zhao, Kai Su, Yifei Yang, Xiangyao Yu et al.SIGMOD 2025 · 13 citations
  2. Approximate Query Processing under UpdatesBinyang Dai, Ke YiSIGMOD 2026
  3. AJoin: Ad-hoc Stream Joins at ScaleJeyhun Karimov, Tilmann Rabl, Volker MarklVLDB 2020 · 14 citations
  4. Thrifty Query Execution via IncrementabilityDixin Tang, Zechao Shang, Aaron J. Elmore, Sanjay Krishnan et al.SIGMOD 2020 · 9 citations
  5. Yannakakis+: Practical Acyclic Query Evaluation with Theoretical GuaranteesQichen Wang, Bingnan Chen, Binyang Dai, Ke Yi et al.SIGMOD 2025 · 7 citations
Dusk over the sea between two cliffs drawn in fine vertical lines