Hacker News new | ask | show | jobs
by Alex3917 4496 days ago
While you're correct, GROUP BY apparently also does kill the indexing:

http://dev.mysql.com/doc/refman/5.0/en/group-by-optimization...

1 comments

What are you talking about? According to that page, the example from the quiz would result in a tight index scan:

> The GROUP BY does not begin with the first part of the key, but there is a condition that provides a constant for that part:

> SELECT c1, c2, c3 FROM t1 WHERE c1 = 'a' GROUP BY c2, c3;