![Mastering PostgreSQL 9.6](https://wfqqreader-1252317822.image.myqcloud.com/cover/151/36701151/b_36701151.jpg)
上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:
![](https://epubservercos.yuewen.com/69101E/19470408708964306/epubprivate/OEBPS/Images/20.jpg?sign=1738862972-aVfCOSsrokjvFIxv9eNjuDNz8vcPLVob-0-7fb3508838606541dde0e831b9b2702d)
To write your own operator classes for SP-GiST, a couple of functions have to be provided:
![](https://epubservercos.yuewen.com/69101E/19470408708964306/epubprivate/OEBPS/Images/21.jpg?sign=1738862972-QXVqGIU1FWzr7Tlgl3L6NiPXEAFOgsEb-0-0c87a2329d615189dee8c87fedc8e99d)