In the late 1990s, the database landscape underwent a significant transformation. The industry was moving beyond simple transaction recording (OLTP) toward On-Line Analytical Processing (OLAP)—the practice of synthesizing vast amounts of data to drive business intelligence. In her seminal 1997 paper, "Indexing OLAP Data," Sunita Sarawagi of IBM Almaden Research Center examines the fundamental indexing structures required to make these complex, multidimensional queries performant.
The Challenge of Multidimensional Queries
Traditional relational databases rely heavily on B-trees, which are optimized for "point queries"—finding a specific record based on a unique key. However, OLAP queries are inherently multidimensional and range-oriented. A typical question might be: "What was the total profit for shampoo in California during the last three winters?"
Such queries involve multiple attributes (Product, State, Time) and complex ranges. Standard B-trees struggle here because they lack "symmetry." They prioritize the first attribute in a compound key; if a user queries by the second or third attribute without specifying the first, the index becomes largely ineffective, leading to slow full-table scans.
Evaluating Existing Indexing Strategies
Sarawagi categorizes and critiques the dominant indexing methods of the era:
- Array-based Storage: While extremely fast for dense datasets, arrays become inefficient for "sparse" data—scenarios where most combinations of dimensions (e.g., a specific product in a specific store on a specific day) have no associated sales.
- Bit-mapped Indices: These were the industry standard for low-cardinality data (like "Gender" or "Region"). However, they become bloated and computationally expensive when dealing with high-cardinality attributes like "Product IDs" or "Customer Names," where thousands of unique values exist.
- Hierarchical Indices: These are efficient for pre-computed, static views but lack the flexibility required for ad-hoc exploratory queries.
A Novel R-Tree Optimization for "Clumpy" Data
The paper’s primary contribution is a proposed optimization for the R-tree, a structure traditionally used for spatial and geographic data. Sarawagi observes that real-world OLAP data is rarely uniformly sparse. Instead, it is "clumpy"—it contains dense rectangular regions (clusters) surrounded by vast empty spaces.
To exploit this characteristic, Sarawagi introduces Dense Cluster Indexing:
- Hybrid Storage: Instead of indexing every individual data point, the R-tree stores the boundaries of dense regions as "bounding boxes."
- Sub-array Pointers: Within these boxes, the system uses a pointer to a contiguous sub-array. This allows the database to use simple, fast array-offset mathematics for dense "clumps" while relying on tree-traversal for sparse areas.
Key Insights and Performance Trade-offs
The paper highlights several critical advantages of this approach:
- Symmetry: Unlike B-trees, R-trees treat all dimensions equally. Users can query any combination of dimensions without a massive performance penalty.
- Storage Efficiency: By replacing thousands of individual index entries with a single bounding box and a sub-array, the optimized R-tree significantly reduces storage overhead.
- Update Performance: Theoretically, R-trees are more efficient to update than bit-mapped indices. Adding data to a bit-map often requires a complete rewrite of the structure, whereas R-trees can be updated incrementally.
Conclusion and Future Directions
While the paper provides a compelling theoretical framework, Sarawagi acknowledges several hurdles for future research. First, the "search for clusters"—automatically identifying these dense rectangular regions—is computationally intensive and may require algorithms borrowed from image analysis. Second, the "curse of dimensionality" remains a factor; while R-trees outperform B-trees in multidimensional spaces, their efficiency begins to degrade as the number of dimensions grows beyond 10 or 20.
Ultimately, "Indexing OLAP Data" serves as a pivotal argument for moving away from one-size-fits-all indexing. By recognizing the non-uniform nature of data distribution, Sarawagi paved the way for more flexible, hybrid indexing structures in modern data warehousing.
Note: This article is based on a survey and theoretical proposal published in the IEEE Data Engineering Bulletin. Experimental results were noted as being in preparation at the time of the original publication.
Summary updated