Mastering PostgreSQL 9.6
上QQ阅读APP看书,第一时间看更新

SP-GiST indexes

Space partitioned GiST (SP-GiST) has mainly been designed for in-memory use. The reason for that is that an SP-GiST stored on disk needs a fairly high number of disk hits to function. Disk hits are way more expensive than just following a couple of pointers in RAM.

The beauty is that SP-GiST can be used to implement various types of trees such as quad-trees, k-d trees, and radix trees (tries).

The following strategies are provided:

To write your own operator classes for SP-GiST, a couple of functions have to be provided: