Lune

SIGMOD2021Top-tier venue

Combining Aggregation and Sampling (Nearly) Optimally for Approximate Query Processing

Xi Liang, Stavros Sintos, Zechao Shang, Sanjay Krishnan

Abstract

Sample-based approximate query processing (AQP) suffers from many pitfalls such as the inability to answer very selective queries and unreliable confidence intervals when sample sizes are small. Recent research presented an intriguing solution of combining materialized, pre-computed aggregates with sampling for accurate and more reliable AQP. We explore this solution in detail in this work and propose an AQP physical design called PASS, or Precomputation-Assisted Stratified Sampling. PASS builds a tree of partial aggregates that cover different partitions of the dataset. The leaf nodes of this tree form the strata for stratified samples. Aggregate queries whose predicates align with the partitions (or unions of partitions) are exactly answered with a depth-first search, and any partial overlaps are approximated with the stratified samples. We propose an algorithm for optimally partitioning the data into such a data structure with various practical approximation techniques.

  • A version of this paper has been accepted to SIGMOD'21. This document is its associated technical report. This work is mainly done when Zechao was at the University of Chicago.

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.

9 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

  • Approximate Partition Selection for Big-Data Workloads using Summary Statistics cites Learning to Sample: Counting with Complex Queries
  • Approximate Partition Selection for Big-Data Workloads using Summary Statistics cites CoopStore: Optimizing Precomputed Summaries for Aggregation
  • ALECE: An Attention-based Learned Cardinality Estimator for SPJ Queries on Dynamic Workloads cites Deep Unsupervised Cardinality Estimation
  • PairwiseHist: Fast, Accurate, and Space-Efficient Approximate Query Processing with Data Compression cites DeepDB: Learn from Data, not from Queries!
  • Towards Observability for Production Machine Learning Pipelines [Vision] cites Deep Unsupervised Cardinality Estimation
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers9

  1. ALECE: An Attention-based Learned Cardinality Estimator for SPJ Queries on Dynamic WorkloadsPengfei Li, Wenqing Wei, Rong Zhu, Bolin Ding et al.VLDB 2024 · 50 citations
  2. Towards Observability for Production Machine Learning Pipelines [Vision]Shreya Shankar, Aditya G. ParameswaranVLDB 2022 · 21 citations
  3. LogGrep: Fast and Cheap Cloud Log Storage by Exploiting both Static and Runtime PatternsJunyu Wei, Guangyan Zhang, Junchao Chen, Yang Wang et al.EuroSys 2023 · 18 citations
  4. ThalamusDB: Approximate Query Processing on Multi-Modal DataSaehan Jo, Immanuel TrummerSIGMOD 2024 · 11 citations
  5. PairwiseHist: Fast, Accurate, and Space-Efficient Approximate Query Processing with Data CompressionAaron Hurst, Daniel E. Lucani, Qi ZhangVLDB 2024 · 5 citations

Builds on5

  1. Deep Unsupervised Cardinality EstimationZongheng Yang, Eric Liang, Amog Kamsetty, Chenggang Wu et al.VLDB 2020 · 206 citations
  2. DeepDB: Learn from Data, not from Queries!Benjamin Hilprecht, Andreas Schmidt, Moritz Kulessa, Alejandro Molina et al.VLDB 2020 · 154 citations
  3. Learning to Sample: Counting with Complex QueriesBrett Walenz, Stavros Sintos, Sudeepa Roy, Jun YangVLDB 2020 · 16 citations
  4. Approximate Partition Selection for Big-Data Workloads using Summary StatisticsKexin Rong, Yao Lu, Peter Bailis, Srikanth Kandula et al.VLDB 2020 · 8 citations
  5. CoopStore: Optimizing Precomputed Summaries for AggregationEdward Gan, Peter Bailis, Moses CharikarVLDB 2020

Related papers

  1. AB-tree: Index for Concurrent Random Sampling and UpdatesZhuoyue Zhao, Dong Xie, Feifei LiVLDB 2022 · 7 citations
  2. Accelerating Approximate Aggregation Queries with Expensive PredicatesDaniel Kang, John Guibas, Peter Bailis, Tatsunori Hashimoto et al.VLDB 2021 · 34 citations
  3. Join on Samples: A Theoretical Guide for PractitionersDawei Huang, Dong Young Yoon, Seth Pettie, Barzan MozafariVLDB 2020 · 13 citations
  4. Rapid Approximate Aggregation with Distribution-Sensitive Interval GuaranteesStephen Macke, Maryam Aliakbarpour, Ilias Diakonikolas, Aditya G. Parameswaran et al.ICDE 2021 · 3 citations
  5. PilotDB: Database-Agnostic Online Approximate Query Processing with A Priori Error GuaranteesYuxuan Zhu, Tengjun Jin, Stefanos Baziotis, Chengsong Zhang et al.SIGMOD 2025 · 3 citations
Dusk over the sea between two cliffs drawn in fine vertical lines