Event Timeline
Comment Actions
On enwiki:
+------+-------------+---------+-------+---------------------+-----------+---------+---------------------+----------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+-------------+---------+-------+---------------------+-----------+---------+---------------------+----------+-------------+ | 1 | SIMPLE | user | index | PRIMARY | PRIMARY | 4 | NULL | 21705642 | | | 1 | SIMPLE | logging | ref | type_time,user_time | user_time | 4 | enwiki.user.user_id | 1 | Using where | +------+-------------+---------+-------+---------------------+-----------+---------+---------------------+----------+-------------+
Comment Actions
Okay then, so I'm guessing it's the GROUP BY / ORDER BY that are taking all the time, right?
Comment Actions
That is most likely the case - the grouping and ordering requires the entire result set before it can return any rows.