mysql: very simple SELECT id ORDER BY LIMIT will not use INDEX as expected (?!)
问题 I have a simple table with about 3 million records. I made the neccessary indexes, i also force the index PRIMARY but still doesnt work. It searches for nearly all 3 million rows instead of using the index to execute this one (record_id is INT auto-increment): EXPLAIN SELECT record_id FROM myrecords FORCE INDEX ( PRIMARY ) ORDER BY record_id ASC LIMIT 2955900 , 300 id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE myrecords index NULL PRIMARY 4 NULL 2956200 Using