Content Deep Dive
How and when to use btree_gist
Blog post from Neon
Post Details
Company
Date Published
Author
George MacKerron
Word Count
1,086
Language
English
Hacker News Points
2
Source URL
Summary
The btree_gist extension in Postgres allows for the creation of indexes that can handle multi-dimensional data, enabling faster queries on proximity, containment, overlap, and other spatial relationships. A key example is creating a space-time index to quickly search crimes by location and date, reducing query time from 8 seconds to 8 milliseconds. This technique extends to combining one- and multi-dimensional data using BTree indexes with GiST infrastructure.