How to speed up this simple mysql query?
- by Jim Thio
The query is simple:
SELECT
TB.ID,
TB.Latitude,
TB.Longitude,
111151.29341326*SQRT(pow(-6.185-TB.Latitude,2)+pow(106.773-TB.Longitude,2)*cos(-6.185*0.017453292519943)*cos(TB.Latitude*0.017453292519943)) AS Distance
FROM
`tablebusiness` AS TB
WHERE
-6.2767668133836 < TB.Latitude AND TB.Latitude < -6.0932331866164
AND…