Skip to main content
2 of 4
naming
Vince
  • 20.3k
  • 16
  • 48
  • 65

Recalculating distance table - is there fast (fast and dirty OK) way?

I have a system that is based on PostGIS that holds a set of coordinates. It serves a lot of user requests where users send their own current coordinates and receive a set of points that are located nearby, like 5-10 km. Each time the DB pulls all points and calculates the distance between points.

Is there is a way to use a simpler way of calculation, like counting all distances to the base point, and then using some matrix transformation? Or maybe I am missing some PostGIS functionality?