Possible Duplicate:
Get polygons close to a lat,long in MySQL
what is the best approach to do nearby search for >=5,000,000 rows data (and also can be filter by place category (for example want to search "petrol station" nearby) && filter by keyword), and sort it by distance ASC .
is any tutorial / algorithm to do that? how the database stucture, may be must be do clustering ? because if we do search in one big table, it will takes time.
note : let's say inside the table has 10 field (placename,address,category,long,lat,etc). actually, i've try this http://www.arubin.org/files/geo_search.pdf , but it's still slow.