Abstract
Modern decision-support systems (DSS) face a critical challenge: providing interactive response times for queries on massive, high-dimensional datasets. Traditional approximation techniques like sampling and histograms often fail to provide accurate results for complex operations like joins or suffer from the curse of dimensionality. This paper introduces a novel framework for Approximate Query Processing (AQP) that leverages multi-dimensional Haar wavelets. By developing a query algebra that operates directly on compact wavelet coefficients, the authors achieve speedups of over 100x compared to traditional methods while maintaining superior accuracy.
Introduction
In modern data warehousing, users often need to explore terabytes of data interactively. While exact SQL queries on such volumes can take hours, users frequently only require a "ballpark" figure to guide their next steps. Existing approximation techniques have significant drawbacks. Random sampling works for simple aggregates but fails for joins because joining two small samples often results in an empty set. Histograms, while effective for low-dimensional data, require an exponential number of buckets as dimensionality increases, making them impractical for complex schemas.
Methodology
The core of this research is the shift from processing raw relational data to processing data in the wavelet-coefficient domain.
Wavelet Synopses
The framework uses the multi-dimensional Haar wavelet transform to decompose relational tables into a set of coefficients. A compact synopsis is created by retaining only the most "significant" coefficients—those with the largest normalized values—which effectively capture the data's distribution.
I/O-Efficient Decomposition
To handle massive datasets, the authors developed a new algorithm for building wavelet synopses that requires only a few passes over the data, scaling linearly with the dataset size.
Query Algebra in the Coefficient Domain
A major contribution of this work is the development of a query algebra where operators like SELECT, PROJECT, and JOIN work directly on wavelet coefficients. By staying in the coefficient domain throughout the query pipeline and only expanding back into relational tuples at the final step, the system avoids the overhead of materializing large intermediate results.
Key Insights
Energy Compaction and High Dimensionality
Wavelets are exceptionally good at "energy compaction," representing the most important features of a dataset with very few numbers. This makes them naturally suited for high-dimensional data where distributions are often sparse or have localized patterns.
The "Nonstandard" Advantage for Joins
The authors chose a "nonstandard" multi-dimensional Haar decomposition. This strategic choice allows them to represent the sign information of coefficients using simple 2-bit "sign vectors" for each dimension. This representation is key to making efficient join operations possible by identifying overlapping coefficient hyper-rectangles.
Experimental Results
The approach was evaluated using synthetic datasets and real-world US Census data (4D data array with 2 million cells).
- Speed: The wavelet-based approach is more than two orders of magnitude faster (100x+) than running queries on original base relations and significantly outperforms histograms in join execution time.
- Accuracy: For
SELECT-SUMqueries on census data, wavelets showed more than an order of magnitude improvement in relative error compared to both sampling and histograms. - Join Performance: Unlike sampling, which often fails to produce results for joins, the wavelet approach provided accurate approximate join results even with very small synopses.
Conclusion
This paper demonstrates that wavelet-based synopses provide a robust and efficient foundation for approximate query processing in high-dimensional environments. While the current framework covers core relational operators, future research could extend these techniques to more complex SQL features and dynamic data updates.
Summary updated