DISTINCT and GROUP BY
Jun 3rd, 2009 by sherlock Hit :: 6047
A DISTINCT and GROUP BY usually generate the same result, so performance should be the same across both query constructs.
the diff ::
Use “Group by” when you use aggregate query, and “DISTINCT” when you want to distinct values.
Essentially it is just a matter of syntax in this case, the end result should be same.
summary :
some people said that “DISTINCT” execute faster than the “GROUP BY”, because GROUP BY performs appropriate sorting before returning the results. CMIIW