Company
Date Published
July 8, 2024
Author
George MacKerron
Word count
1086
Language
English
Hacker News points
2

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.