# Disjoint interval partitioning

Cafagna, Francesco; Böhlen, Michael Hanspeter (2017). Disjoint interval partitioning. VLDB Journal, 26(3):447-466.

## Abstract

In databases with time interval attributes, query processing techniques that are based on sort-merge or sort-aggregate deteriorate. This happens because for intervals no total order exists and either the start or end point is used for the sorting. Doing so leads to inefficient solutions with lots of unproductive comparisons that do not produce an output tuple. Even if just one tuple with a long interval is present in the data, the number of unproductive comparisons of sort-merge and sort-aggregate gets quadratic. In this paper we propose disjoint interval partitioning ($\mathcal {DIP}$), a technique to efficiently perform sort-based operators on interval data. $\mathcal {DIP}$ divides an input relation into the minimum number of partitions, such that all tuples in a partition are non-overlapping. The absence of overlapping tuples guarantees efficient sort-merge computations without backtracking. With $\mathcal {DIP}$ the number of unproductive comparisons is linear in the number of partitions. In contrast to current solutions with inefficient random accesses to the active tuples, $\mathcal {DIP}$ fetches the tuples in a partition sequentially. We illustrate the generality and efficiency of $\mathcal {DIP}$ by describing and evaluating three basic database operators over interval data: join, anti-join and aggregation.

## Abstract

In databases with time interval attributes, query processing techniques that are based on sort-merge or sort-aggregate deteriorate. This happens because for intervals no total order exists and either the start or end point is used for the sorting. Doing so leads to inefficient solutions with lots of unproductive comparisons that do not produce an output tuple. Even if just one tuple with a long interval is present in the data, the number of unproductive comparisons of sort-merge and sort-aggregate gets quadratic. In this paper we propose disjoint interval partitioning ($\mathcal {DIP}$), a technique to efficiently perform sort-based operators on interval data. $\mathcal {DIP}$ divides an input relation into the minimum number of partitions, such that all tuples in a partition are non-overlapping. The absence of overlapping tuples guarantees efficient sort-merge computations without backtracking. With $\mathcal {DIP}$ the number of unproductive comparisons is linear in the number of partitions. In contrast to current solutions with inefficient random accesses to the active tuples, $\mathcal {DIP}$ fetches the tuples in a partition sequentially. We illustrate the generality and efficiency of $\mathcal {DIP}$ by describing and evaluating three basic database operators over interval data: join, anti-join and aggregation.