app/jobs/historize_towns_around_job.rb:17
- Average Self
-
113ms
- Average calls
- 1x
- Total Self
- 113ms
- Total Children
- 0ms
- Total runtime
- 113ms
SELECT `towns`.* FROM `towns` WHERE (updated_at < ?) AND ((population BETWEEN ? AND ? AND ST_DISTANCE_SPHERE(POINT(towns.longitude, towns.latitude), POINT(?, ?)) < ?)
OR (population BETWEEN ? AND ? AND ST_DISTANCE_SPHERE(POINT(towns.longitude, towns.latitude), POINT(?, ?)) < ?)
OR (population BETWEEN ? AND ? AND ST_DISTANCE_SPHERE(POINT(towns.longitude, towns.latitude), POINT(?, ?)) < ?)
OR (population > ? AND ST_DISTANCE_SPHERE(POINT(towns.longitude, towns.latitude), POINT(?, ?)) < ?)) ORDER BY `towns`.`id` ASC LIMIT ?
|