In case you have your own slow SQL query, you can optimize it automatically here.
For the query above, the following recommendations will be helpful as part of the SQL tuning process.
You'll find 3 sections below:
ALTER TABLE `table` ADD INDEX `table_idx_latitude` (`latitude`);
SELECT
table.geonameid,
SQRT(POW(table.latitude - 52,
2) + POW(table.longitude - 14,
2)) AS distance
FROM
table
WHERE
table.latitude >= 52 - 1
AND table.latitude <= 52 + 1
AND table.longitude >= 14 - 1
AND table.longitude <= 14 + 1
ORDER BY
distance ASC LIMIT 1