mysql> SELECT COUNT(DISTINCT uid_entered) FROM 2_l10n_community_translation GROUP BY uid_entered; +-----------------------------+ | COUNT(DISTINCT uid_entered) | +-----------------------------+ | 1 | | 1 | +-----------------------------+ 2 rows in set (7.52 sec) mysql> explain SELECT COUNT(DISTINCT uid_entered) FROM 2_l10n_community_translation GROUP BY uid_entered; +----+-------------+------------------------------+------+---------------+------+---------+------+---------+----------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+------------------------------+------+---------------+------+---------+------+---------+----------------+ | 1 | SIMPLE | 2_l10n_community_translation | ALL | NULL | NULL | NULL | NULL | 5369560 | Using filesort | +----+-------------+------------------------------+------+---------------+------+---------+------+---------+----------------+ 1 row in set (0.00 sec) mysql> create index l10nuid_entered on 2_l10n_community_translation(uid_entered); Query OK, 5369560 rows affected (2 min 30.20 sec) Records: 5369560 Duplicates: 0 Warnings: 0 mysql> explain SELECT COUNT(DISTINCT uid_entered) FROM 2_l10n_community_translation GROUP BY uid_entered; +----+-------------+------------------------------+-------+---------------+-----------------+---------+------+---------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+------------------------------+-------+---------------+-----------------+---------+------+---------+-------------+ | 1 | SIMPLE | 2_l10n_community_translation | index | NULL | l10nuid_entered | 4 | NULL | 5369560 | Using index | +----+-------------+------------------------------+-------+---------------+-----------------+---------+------+---------+-------------+ 1 row in set (0.00 sec) mysql> SELECT COUNT(DISTINCT uid_entered) FROM 2_l10n_community_translation GROUP BY uid_entered; +-----------------------------+ | COUNT(DISTINCT uid_entered) | +-----------------------------+ | 1 | | 1 | +-----------------------------+ 2 rows in set (2.96 sec)