Efficient Incrementialization of Correlated Nested Aggregate Queries using Relative Partial Aggregate Indexes (RPAI)
Supun Abeysinghe, Qiyang He, Tiark Rompf
Abstract
Incrementalization of queries is imperative in cases where data arrives as streams and output is latency-critical and/or desired before the full data has been received. Incremental execution computes the output at a given time by reusing the previously computed outputs or maintained views rather than re-evaluating the query from scratch. There are various approaches to perform this incrementalization ranging from query-specific algorithms and data structures (e.g., DYN, AJU) to general systems (e.g., DBToaster, Materialize).
DBToaster is a state-of-the-art system that comes with an appealing theoretical background based on the idea of applying Incremental View Maintenance (IVM) recursively, maintaining a hierarchy of materialized views via delta queries. However, one key limitation of this approach is its inability to efficiently incrementalize correlated nested-aggregate queries due to an inefficient delta rule for such queries. Moreover, none of the other specialized approaches have shown efficient ways to optimize such queries either. Nonetheless, these types of queries can be found in many real-world application domains (e.g., finance), for which efficient incrementalization remains a crucial open problem. In this work, we propose an approach to incrementalize such queries based on a novel tree-based index structure called Relative Partial Aggregate Indexes (RPAI). Our approach is asymptotically faster than other systems and shows up to 1100× speedups in workloads of practical importance.
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 4eb70745-0cdb-4221-b32e-5c0a43ff03bfCited by top-tier papers2
- From Batch to Stream: Automatic Generation of Online AlgorithmsZiteng Wang, Shankara Pailoor, Aaryan Prakash, Yuepeng Wang et al.PLDI 2024 · 4 citations
- Fast Direct Manipulation Programming with Patch-Reconciliation CorrespondenceParker Ziegler, Justin Lubin, Sarah E. ChasinsPLDI 2025 · 1 citation
Builds on5
- Shared Arrangements: practical inter-query sharing for streaming dataflowsFrank McSherry, Andrea Lattuada, Malte Schwarzkopf, Timothy RoscoeVLDB 2020 · 25 citations
- Maintaining Acyclic Foreign-Key Joins under UpdatesQichen Wang, Ke YiSIGMOD 2020 · 13 citations
- Thrifty Query Execution via IncrementabilityDixin Tang, Zechao Shang, Aaron J. Elmore, Sanjay Krishnan et al.SIGMOD 2020 · 9 citations
- Tempura: A General Cost-Based Optimizer Framework for Incremental Data ProcessingZuozhi Wang, Kai Zeng, Botong Huang, Wei Chen et al.VLDB 2021 · 9 citations
- Resource-efficient Shared Query Execution via Exploiting Time SlacknessDixin Tang, Zechao Shang, William W. Ma, Aaron J. Elmore et al.SIGMOD 2021 · 4 citations
Related papers
- TreeToaster: Towards an IVM-Optimized CompilerDarshana Balakrishnan, Carl Nuessle, Oliver Kennedy, Lukasz ZiarekSIGMOD 2021 · 4 citations
- Lightweight Materialization for Fast Dashboards Over JoinsZezhou Huang, Eugene WuSIGMOD 2024 · 2 citations
- Large-Scale Multiple Query Optimisation with Incremental Quantum(-Inspired) AnnealingManuel Schönberger, Immanuel Trummer, Wolfgang MauererSIGMOD 2026 · 6 citations
- LightSaber: Efficient Window Aggregation on Multi-core ProcessorsGeorgios Theodorakis, Alexandros Koliousis, Peter R. Pietzuch, Holger PirkSIGMOD 2020 · 36 citations
- DeCo: A Core Calculus for Incremental Functional Programming with Generic Data TypesTimon Böhler, Tobias Reinhard, David Richter, Mira MeziniOOPSLA 2026
