title: MAX() Function with Group by is very slow
body: <p>My query is really slow; It takes 17 seconds to execute. It hits 100% CPU on Godaddy VPS. Any ideas what can be done?</p>
  
  <p>This query:</p>
  
  <pre><code>         SELECT
               `gps_unit_location`.`idgps_unit`,
               MAX(`gps_unit_location`.`dt`) dtmax
           FROM `gps_unit_location`
           GROUP BY 1
  </code></pre>
  
  <p>Explain</p>
  
  <pre><code>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=''
  </code></pre>