Prevent a temporary DB table caused by SQL group by

Code
-- tested with MySQL 5.6

-- Missing index. Filesort and tmp table using more memory
EXPLAIN SELECT name, status, SUM(price)
  FROM history
    GROUP BY name, status;

-- index (name, status)
EXPLAIN SELECT name, status, SUM(price)
  FROM history
  GROUP BY name, status;
Result
idselect_typetablepartitionstypepossible_keyskeykey_lenrefrowsfilteredExtra
1SIMPLEhistorynullALLnullnullnullnull1407100Using temporary


idselect_typetablepartitionstypepossible_keyskeykey_lenrefrowsfilteredExtra
1SIMPLEhistorynullindexname_status_idxname_status_idx771null1407100null