Distinct or group by '*'
select name from table group by name
or
select distinct name from table
after all they both return the exact same result.
Some explain statements later it turned out that the group by clause is 18% faster than the distinct statement.
No comments:
Post a Comment