NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Cache-Oblivious Query Processing

Bingsheng He, Qiong Luo

Abstract

Relational database performance is increasingly constrained by the "memory wall," where CPU speeds far outpace main memory latency. Traditional optimizations rely on cache-conscious algorithms tuned to specific hardware parameters. This paper presents EaseDB, an in-memory query processor built entirely on cache-oblivious algorithms. By utilizing recursive divide-and-conquer techniques and novel data structures like Packed Memory Arrays (PMA), EaseDB achieves near-optimal performance across diverse hardware architectures without requiring manual tuning or hardware-specific parameters.

Introduction

In modern computing, the efficiency of CPU caches (L1, L2, L3) is a primary determinant of in-memory database performance. Standard "cache-conscious" approaches require explicit hardware parameters—such as cache capacity and line size—to optimize data layout. However, the increasing complexity and diversity of hardware make such manual tuning fragile and difficult to scale. Calibration tools often yield inaccurate parameters, and research shows that the "optimal" software parameter frequently diverges from physical hardware specs.

This research explores the feasibility of a cache-oblivious database system. A cache-oblivious algorithm is designed to perform well across all levels of a memory hierarchy without knowing specific capacities or block sizes, achieving efficiency through recursive partitioning and amortization.

EaseDB Architecture

EaseDB is a relational query processor designed from the ground up using the cache-oblivious model. Its architecture integrates several key components to ensure hardware-independent efficiency.

Figure 3: The architecture of EaseDB, showing the query plan flow and the execution engine components including operators, access methods, and storage.

As shown in Figure 3, the system consists of a standard SQL parser and a specialized query optimizer. A critical innovation is the CO cost estimator, which predicts cache misses by integrating over all possible cache capacities and block sizes. This allows EaseDB to select the most efficient query plan without needing to know the actual hardware specifications of the machine it is running on.

Storage and Access Methods

EaseDB replaces traditional linked lists and slotted pages with a Packed Memory Array (PMA). The PMA maintains an ordered sequence of elements with strategically placed gaps to allow for efficient insertions while preserving sequential scan performance. For indexing, EaseDB employs Cache-Oblivious B+-trees (COB+-trees) using a van Emde Boas (vEB) layout, which recursively maps a tree into a linear array to optimize cache locality at every level of the hierarchy.

Query Operators

Operators like joins (Nested-Loop, Sort-Merge, and Hash) are implemented using recursive partitioning. The data is repeatedly halved until the partitions naturally fit into whatever cache level is available. This divide-and-conquer approach ensures that the working set eventually resides in the fastest possible memory tier, regardless of its specific size.

Experimental Results

The authors evaluated EaseDB against manually tuned cache-conscious systems on Intel P4, AMD Opteron, and Sun Ultra-Sparc architectures.

Storage Performance

The PMA storage model was a highlight of the empirical study. It significantly outperformed traditional linked-list structures in sequential scan scenarios, which are common in analytical workloads.

Figure 6: Performance comparison between linked-list and PMA storage models for random insertion and table scan operations.

As illustrated in Figure 6, while PMA incurs a slight overhead during random insertions due to the need to maintain order and gaps, it provides a substantial speedup (over 2x) for table scans. This trade-off is highly beneficial for query-heavy database environments where scan performance is paramount.

Join and Index Efficiency

Across all tested architectures, cache-oblivious joins matched or exceeded the performance of the best-tuned cache-conscious equivalents. Hardware profiling on Intel P4 processors confirmed that the oblivious approach reduced stalls across L1, L2, and TLB levels simultaneously. In contrast, cache-conscious algorithms often optimize for one specific level at the expense of others, leading to thrashing elsewhere in the hierarchy.

Conclusion

EaseDB demonstrates that cache-oblivious algorithms can provide high-performance query processing without the burden of platform-specific tuning. By leveraging recursive partitioning and cache-oblivious data structures, databases can automatically adapt to the underlying memory hierarchy. Future work will focus on extending these techniques to column-oriented storage and evaluating performance on emerging many-core and GPU architectures.

Summary updated

BibTeX
@inproceedings{he2007cache,
  author = {Bingsheng He and Qiong Luo},
  title = {{Cache-Oblivious Query Processing}},
  booktitle = {CIDR},
  year = {2007},
}
Figure