Query:
SELECT /* BatchRowIterator::next www-data@mediaw... */ page_id,page_namespace,page_title,page_restrictions,page_is_redirect,page_is_new,page_random,page_touched,page_links_updated,page_latest,page_len,page_content_model FROM `page` WHERE page_namespace = '0' AND (( page_id > '38263463' )) ORDER BY page_id ASC LIMIT 100;
Explain:
+------+-------------+-------+-------+--------------------+---------+---------+------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+-------------+-------+-------+--------------------+---------+---------+------+------+-------------+ | 1 | SIMPLE | page | index | PRIMARY,name_title | PRIMARY | 4 | NULL | 200 | Using where | +------+-------------+-------+-------+--------------------+---------+---------+------+------+-------------+
Running the query though (against enwiki) i get
100 rows in set (16.48 sec)
The explain claims it's using the primary index, but if i adjust the query:
SELECT /* BatchRowIterator::next www-data@mediaw... */ page_id,page_namespace,page_title,page_restrictions,page_is_redirect,page_is_new,page_random,page_touched,page_links_updated,page_latest,page_len,page_content_model FROM `page` FORCE INDEX (PRIMARY) WHERE page_namespace = '0' AND (( page_id > '38263463' )) ORDER BY page_id ASC LIMIT 100;
Then the execution runs as expected:
100 rows in set (0.00 sec)