2
我有5個表:快速找到附近的用戶使用的PostGIS
- 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.
我要查找當前用戶附近的朋友,但它需要大量的執行SELECT查詢的時間知道用戶是朋友,之後執行選擇使用ST_DWithin
。在域模型或查詢中可能有問題?
請問你現在正在使用的查詢嗎? – Quassnoi 2010-04-26 09:58:42