Partitioned-Tree Nested Loop Join: An Efficient Join for Spatio-Temporal Interval Join

Jinsoo Lee, Wook-Shin Han, Jaehwa Kim, Jeong-Hoon Lee

Introduction

Predictive spatio-temporal interval joins are essential for modern applications such as air traffic control and telematics. These queries, for example, "Find all pairs of vehicles that will come within 10 feet of each other between 05:30 and 06:00," require joining massive sets of moving objects over future time intervals. As data volumes grow, performing these joins efficiently—especially under memory constraints—becomes a critical challenge.

The Challenge: Buffer Thrashing

Previous state-of-the-art solutions, such as STJoin, utilize Space Filling Curves (SFCs) to improve spatial locality and make searches more memory-friendly. However, these methods often rely on the assumption that the system buffer is large enough to hold all index pages required for a search. In memory-constrained environments, this assumption fails, leading to "buffer thrashing"—a state where the system constantly swaps pages between disk and memory, causing a catastrophic collapse in performance.

Methodology: The PTJoin Algorithm

To address this, the Partitioned-Tree Nested Loop Join (PTJoin) introduces a "divide and conquer" strategy for index management. Instead of treating the inner index tree (Tree $S$) as a single monolithic structure, PTJoin partitions it into smaller, manageable sub-trees.

The process of window construction and search in spatio-temporal joins.

The algorithm follows four key steps:

  1. Tree Partitioning: Leaf nodes of the inner index (Tree $S$) are partitioned into smaller groups.
  2. Sub-tree Construction: Temporary sub-trees are built for each group. These are sized to ensure that the pages required for searching them fit entirely within the system's LRU (Least Recently Used) buffer.
  3. Heuristic Overlap Minimization: A heuristic is applied to minimize spatial overlap between partitions, ensuring that consecutive window searches do not redundantly fetch the same pages from disk.
  4. Adaptive Execution: PTJoin can dynamically switch between its partitioned approach and standard join methods based on a cost model that considers available buffer size.

Experimental Evaluation

The authors evaluated PTJoin using the GSTD (Generate Spatio-temporal Data) tool across various distributions, including Gaussian, Uniform, and Skewed, as well as a realistic Road Network dataset.

Comparison of disk page accesses across different data distributions and buffer sizes.

The results demonstrate that PTJoin is significantly more robust than existing methods like STJoin and DFSJ. In scenarios with small buffers, PTJoin (specifically PTJoin-8) reduced disk I/O by up to an order of magnitude. The experiments also identified a performance convergence point: once the buffer size reaches approximately 10% of the inner index size (around 850 KB in these tests), the benefits of partitioning diminish, and PTJoin performs similarly to standard methods.

Conclusion

PTJoin provides a robust solution for spatio-temporal joins in memory-limited environments. By manually managing the "working set" of index pages through partitioning, it prevents the performance degradation associated with buffer thrashing. While future work may refine the partitioning heuristics into a more formal optimal cost model, PTJoin currently offers a versatile and highly efficient approach across diverse data distributions.

Summary updated

BibTeX
@article{lee2013partitioned,
  author = {Jinsoo Lee and Wook-Shin Han and Jaehwa Kim and Jeong-Hoon Lee},
  title = {{Partitioned-Tree Nested Loop Join: An Efficient Join for Spatio-Temporal Interval Join}},
  journal = {IEICE Trans. Information and Systems},
  year = {2013},
  doi = {10.1587/transinf.e96.d.1206},
}
Figure