我的查询真的很慢;执行需要 17 秒。它在 Godaddy VPS 上达到 100% CPU。有什么想法可以做什么?
这个查询:
SELECT
`gps_unit_location`.`idgps_unit`,
MAX(`gps_unit_location`.`dt`) dtmax
FROM `gps_unit_location`
GROUP BY 1
解释
id='1', select type='SIMPLE', table='gps_unit_location', type='index', possible keys=NULL, key='fk_gps2', key len='5', ref=NULL, rows='368668', extra=''