geohash vs quadtree vs r-tree - three ways to find what's near you

every time your phone shows "5 ubers within a mile" or yelp pulls up restaurants near your dot on the map, somewhere in the backend a system is solving the same problem: given a point on earth, find all the other points close to it, fast. the naive answer is to scan every row in your database, compute the haversine distance to the query point, and return everything within some radius. this works…