mysql> EXPLAIN SELECT img_name, img_size FROM categorylinks, page, image WHERE cl_from=page_id AND cl_to = 'Astronomy' AND page_title = img_name ORDER BY img_size; +----+-------------+---------------+--------+---------------------------------+--------------+---------+-----------------------------------+------+-----------------------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+---------------+--------+---------------------------------+--------------+---------+-----------------------------------+------+-----------------------------------------------------------+ | 1 | SIMPLE | categorylinks | ref | cl_from,cl_timestamp,cl_sortkey | cl_timestamp | 257 | const | 227 | Using where; Using index; Using temporary; Using filesort | | 1 | SIMPLE | page | eq_ref | PRIMARY | PRIMARY | 4 | commonswiki.categorylinks.cl_from | 1 | | | 1 | SIMPLE | image | eq_ref | PRIMARY | PRIMARY | 257 | commonswiki.page.page_title | 1 | | +----+-------------+---------------+--------+---------------------------------+--------------+---------+-----------------------------------+------+-----------------------------------------------------------+ 3 rows in set (0.00 sec) mysql> EXPLAIN SELECT img_name, img_size FROM categorylinks FORCE INDEX (cl_from), page, image WHERE cl_from=page_id AND cl_to = 'Astronomy' AND img_name = page_title ORDER BY img_size; +----+-------------+---------------+--------+---------------+------------+---------+--------------------------------+----------+----------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+---------------+--------+---------------+------------+---------+--------------------------------+----------+----------------------------------------------+ | 1 | SIMPLE | page | index | PRIMARY | name_title | 261 | NULL | 19081712 | Using index; Using temporary; Using filesort | | 1 | SIMPLE | image | eq_ref | PRIMARY | PRIMARY | 257 | commonswiki.page.page_title | 1 | | | 1 | SIMPLE | categorylinks | eq_ref | cl_from | cl_from | 261 | commonswiki.page.page_id,const | 1 | Using where; Using index | +----+-------------+---------------+--------+---------------+------------+---------+--------------------------------+----------+----------------------------------------------+ 3 rows in set (0.00 sec)