GeospatialIndexing
Database-level indexing structures (R-tree, PostGIS GiST indexes) that make 'find things near this point' queries fast instead of scanning every row and computing distance.
Why we need this / what value this brings
Without a spatial index, a proximity query has to compute distance for every row and sort — an unindexed scan that gets slower linearly as the provider table grows.
When to use this
As soon as there's more than a trivial number of rows being searched by location.
How to use or implement this
Enable the PostGIS extension, use a geography/geometry column, and add a GiST index on it; then use PostGIS's distance/radius functions instead of hand-computed haversine math in application code.
Research questions
- Does Localz's Postgres setup have PostGIS enabled, or is proximity currently computed app-side without a spatial index?
Empty folder — drop notes, links, and findings here as you research.