日期:2014-05-16 浏览次数:20745 次
mysql> explain select * from T order by id desc limit 47, 30; +----+-------------+--------+-------+---------------+---------+---------+------+------+-------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+--------+-------+---------------+---------+---------+------+------+-------+ | 1 | SIMPLE | T | index | NULL | PRIMARY | 4 | NULL | 77 | | +----+-------------+--------+-------+---------------+---------+---------+------+------+-------+ 1 row in set (0.00 sec) mysql> explain select * from T order by id desc limit 48, 30; +----+-------------+--------+------+---------------+------+---------+------+----------+----------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+--------+------+---------------+------+---------+------+----------+----------------+ | 1 | SIMPLE | T | ALL | NULL | NULL | NULL | NULL | 44224755 | Using filesort | +----+-------------+--------+------+---------------+------+---------+------+----------+----------------+ 1 row in set (0.00 sec)