In Parts I (Solving the Overlap Query Problem in PostgreSQL) and II (Overlapping Ranges in Subsets in PostgreSQL) of this series, we used the GiST index type – and its lesser known cousin: SP-GiST – to turbocharge the performance of overlap queries. But GiST indexes are extremely versatile, with uses far beyond the examples I have used so far.
In this final article, we’ll explore some of the many other ways they can be used.
Stuck in the Middle With You
We’ve used only one operator in all our queries so far: the “&&” operator, which returns