Indexing and Querying A Large Database of Typed Intervals

Jianqiu Xu, Hua Lu, Bin YaoEDBT 2016

Introduction

Modern data management often requires handling intervals associated with specific attributes, such as types and weights. For instance, in traffic monitoring, an interval might represent the active period of a vehicle route, categorized by type (e.g., Bus, Taxi) and weighted by passenger count. Standard interval indexing structures, like Edelsbrunner’s interval tree, are optimized for "stabbing queries"—finding all intervals overlapping a point in time. However, they struggle with top-$k$ queries that filter by type and sort by weight.

Example of typed intervals and a top-k query

As shown in Figure 2, a query $Q(8.5, Bus, 1)$ seeks the single highest-weighted "Bus" interval active at time 8.5. Traditional methods often require scanning all intervals at a node to check types, leading to significant CPU overhead and unnecessary I/O when datasets scale to millions of records.

The Slot Method

To address these inefficiencies, researchers proposed the "Slot" indexing structure. This method replaces the simple sorted lists in interval tree nodes with a more sophisticated secondary index based on three core principles:

  1. Space Partitioning: Each node's time range is divided into $g$ equal-length "slots."
  2. Full vs. Partial Tables: Intervals are categorized based on their coverage of these slots. A "Full Table" contains intervals that completely span a slot, meaning any query falling into that slot is guaranteed to intersect them, bypassing expensive mathematical intersection tests. "Partial Tables" handle intervals that only partially overlap.
  3. Type-Weight Indexing: Within each slot, data is indexed first by type and then by weight. This allows the search algorithm to immediately access the relevant category and retrieve the highest-weighted intervals first, facilitating early exit in top-$k$ processing.

Experimental Evaluation

The Slot method was tested against three established competitors: the Ext-I-tree (an interval tree utilizing bit strings), the RI-tree (relational interval tree), and a standard 2D R-tree. The evaluation used five synthetic datasets (S1–S5) containing between 1 million and 50 million intervals, with 100 distinct types and weights ranging from 1 to 500.

Results and Discussion

The experimental results demonstrate the Slot method's superior efficiency across both computational and storage metrics.

Performance comparison of CPU time and I/O accesses

As illustrated in Figure 4, the Slot method consistently outperforms its rivals. In terms of CPU time (Figure 4a), it is 3–6 times faster than the R-tree and up to 10 times faster than the Ext-I-tree. This speedup is largely attributed to the elimination of the "intersection tax" via Full Tables and the ability to stop searches early once $k$ results are found.

I/O efficiency (Figure 4b) also favors the Slot method. While competitors like the RI-tree show high, stable I/O costs, the Slot method maintains a lower profile, even as the query parameters (such as $k$) increase. Furthermore, the Slot method exhibits excellent scalability; while other structures see performance degrade sharply as dataset size grows toward 50 million records, the Slot method's performance curve remains relatively flat.

Conclusion and Future Work

The Slot indexing structure provides a robust solution for querying large-scale databases of typed intervals. By combining space partitioning with type-weight indexing, it significantly reduces the computational burden of top-$k$ retrieval. However, some challenges remain. The system's performance is sensitive to the number of slots ($g$), and the current study relies on synthetic data which may not reflect the "bursty" distributions of real-world sensor logs. Future research will focus on automating parameter selection and exploring the overhead of real-time re-indexing for dynamic datasets. Nevertheless, the current findings establish the Slot method as a high-performance alternative to traditional interval and spatial indexing techniques.

Summary updated

BibTeX
@inproceedings{xu2016indexing,
  author = {Jianqiu Xu and Hua Lu and Bin Yao},
  title = {{Indexing and Querying A Large Database of Typed Intervals}},
  booktitle = {EDBT},
  year = {2016},
  doi = {10.5441/002/edbt.2016.73},
}
Figure