An SP-GiST (space-partitioned generalized search tree) index recursively partitions spatial data into non-overlapping regions. It is especially useful for evenly distributed point data. section 10.6
For geospatial workloads, SP-GiST works by:
- Dividing space around a selected centroid into four non-overlapping quadrants. section 10.6
- Recursively splitting top-level quadrants into smaller regions with their own centroids. section 10.6
- Traversing from broad regions to smaller quadrants containing references to indexed geometries. section 10.6
Uniformly distributed points
A map containing many points spread evenly across space is a strong candidate: points do not overlap by nature, so the index can narrow searches through progressively smaller quadrants. Choose GiST instead when broader spatial operator and function support matters. section 10.6 section 10.7
