title: mysql: improve group by query performance?
body: <p>Is there anyway to increase the performance of a query like this:</p>
  
  <pre><code>  SELECT MAX(my_index)  
      FROM my_table 
  GROUP BY my_type
  </code></pre>
  
  <p>I have an index on my_index and another on my_type. The query takes about 10 seconds once I have millions of records. my_index is unique to each record and autoincrements.</p>
  
  <p>I figure there should be away to do this query quickly if I create a composite index, but I am not sure how. The same query with a composite index on my_index , my_type took twice as long than without it...</p>