I have mysql table, need to find all users that are within 1 km of each other Table:
Geo
----------
id(int)
location(geometry) with spatial index
username(string)
could be solved:
- iterate by users i ... n
- for each select all users within specific polygon, using index
- send msg each other
so complexity would be ~O(n) or more (depends on index), any other solutions with better performance?