Abstract
Calculating exact aggregates on massive datasets is computationally expensive. Approximate Query Processing (AQP) mitigates this by using data samples, but providing reliable confidence intervals (CIs) remains a challenge. Traditional "safe" bounds are often too loose for practical use, while "unsafe" asymptotic methods can lead to incorrect conclusions. This paper presents RangeTrim, a meta-algorithm that produces tighter, mathematically rigorous CIs by identifying and mitigating two specific inefficiencies: Pessimistic Mass Allocation (PMA) and Phantom Outlier Sensitivity (PHOS). Experimental results on the 606-million-tuple Flights dataset demonstrate that RangeTrim-enhanced methods achieve speedups of up to 124× over standard guaranteed methods and over 1000× over exact computation, without compromising safety.
Introduction
In modern data analytics, the latency of exact query processing on "Big Data" often hinders interactive exploration. AQP addresses this by estimating results from a small fraction of the data. However, the utility of an estimate is tied to its Confidence Interval (CI). Existing CI techniques typically force a choice between narrow but potentially "unsafe" asymptotic intervals (e.g., Central Limit Theorem) and safe but overly conservative "loose" bounds (e.g., Hoeffding’s inequality). This research seeks a "Goldilocks" zone: intervals that are sample-size independent and 100% rigorous, yet significantly tighter than traditional conservative estimates.
The Pathologies of Safe Bounds
The researchers identify two primary reasons why traditional safe bounds are excessively loose:
- Pessimistic Mass Allocation (PMA): Standard bounds assume unseen data points reside at the absolute extremes of the possible range (e.g., assuming an unseen salary is either $0 or $1 billion).
- Phantom Outlier Sensitivity (PHOS): A counter-intuitive phenomenon where a lower bound is weakened by a high theoretical maximum, even if no such high values appear in the sample.
The RangeTrim Meta-Algorithm
To address these pathologies, the authors developed RangeTrim, a meta-algorithm that "asymmetrizes" error bounds. RangeTrim ensures that the lower bound is only influenced by the maximum values actually observed in the sample, while the upper bound is only influenced by the observed minimums. This effectively "trims" the theoretical range based on empirical evidence, "exorcising" the phantom outliers that otherwise inflate interval widths.
Implementation and Results
The system was implemented in FastFrame, a custom in-memory column store featuring "Active Scanning." This allows the engine to prioritize I/O for specific query groups that have not yet reached the desired confidence threshold.
Evaluation on the Flights Dataset (606 million tuples) revealed:
- Bernstein+RT (RangeTrim applied to the empirical Bernstein-Serfling inequality) achieved speedups exceeding 1000× compared to exact computation.
- It outperformed industry-standard Hoeffding-Serfling bounds by up to 124×.
- The error rate remained at 0% across all tests, even with a stringent failure budget of $10^{-15}$.
Conclusion
RangeTrim demonstrates that distribution-sensitive, rigorous guarantees can be both safe and highly efficient. By leveraging sample variance and trimming theoretical ranges, it enables rapid, reliable analytics on massive datasets. Future work includes extending these optimizations to streaming contexts and more complex user-defined functions.
Summary updated