Comments on: Optimize GROUP BY a ORDER BY b in mysql https://ewout.name/2011/02/optimize-group-by-a-order-by-b-in-mysql/ Web development, ruby, and rails Thu, 30 Aug 2012 02:37:58 +0000 hourly 1 http://wordpress.org/?v=3.3.1 By: ewout https://ewout.name/2011/02/optimize-group-by-a-order-by-b-in-mysql/comment-page-1/#comment-111 ewout Thu, 10 Nov 2011 09:59:30 +0000 https://ewout.name/2011/02/optimize-group-by-a-order-by-b-in-mysql/#comment-111 Yes, now it says "using index" only. The index on companies.name should only be on that column though. If you have an index on companies.name, companies.short_name for instance, you need to GROUP BY companies.name, companies.short_name, companies.id. Yes, now it says “using index” only. The index on companies.name should only be on that column though. If you have an index on companies.name, companies.short_name for instance, you need to GROUP BY companies.name, companies.short_name, companies.id.

]]>
By: sean https://ewout.name/2011/02/optimize-group-by-a-order-by-b-in-mysql/comment-page-1/#comment-110 sean Thu, 10 Nov 2011 08:46:44 +0000 https://ewout.name/2011/02/optimize-group-by-a-order-by-b-in-mysql/#comment-110 were you able to get rid of "Using temporary" using group by the 2 columns ? were you able to get rid of “Using temporary” using group by the 2 columns ?

]]>