Does Your GROUP BY Order Matter?
Sometimes when you do GROUP BY, the order of the columns does matter. For example, these two SELECT queries produce different results:
[crayon-6a6f233b94abf063444585/]
Their actual execution plans are wildly different:
They both use the index to retrieve their data, sure, but: