I have a place's table, in this, each record has latitude and longitude of that place.
Now I want to find nearby places (within 10 KM) from places table according to given lat-long.
I have 500 + place's records in my database table.
Currently i am using mysql query for the same :
SELECT FROM provider_venues WHERE IFNULL( ( 111.111 (
DEGREES(ACOS(COS(RADIANS(26.2743661)) COS(RADIANS(venue_lat))
COS(RADIANS(73.02130979999993 - venue_long)) +
SIN(RADIANS(26.2743661)) * SIN(RADIANS(venue_lat))))) ), 0) <= 10
But distance i the am getting from above query is different from the distance i am getting from google API.
I can use google API for this but using google API for every record may not be good approach.
Is there any way to use google API in more optimized way or any other solution to get the expected result faster?