Fast find near users using PostGIS

Posted by opedge on Stack Overflow See other posts from Stack Overflow or by opedge
Published on 2010-04-26T09:51:51Z Indexed on 2010/04/26 9:53 UTC
Read the original article Hit count: 310

Filed under:
|

I have 5 tables: - users - information about user with current location_id (fk to geo_location_data) - geo_location_data - information about location, with PostGIS geography(POINT, 4326) column - user_friends - relationships between users. I want to find near friends for current user, but it takes a lot of time of executing select query to know if user is a friend and after that execute select using ST_DWithin.. May be something wrong in domain model or in queries?

© Stack Overflow or respective owner

Related posts about postgis

Related posts about postgresql