![c06286ec0fd788795bbe7a7c2858165c.png](https://i-blog.csdnimg.cn/blog_migrate/27e8cfeab04604e0bfbb5cb673adfee0.jpeg)
CREATE TABLE `tblA`( `id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT, `age` INT(11) DEFAULT NULL, `birth` timestamp not NULL )ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; insert into tblA(age,birth) values (22,now());insert into tblA(age,birth) values (23,now());insert into tblA(age,birth) values (24,now()); create index idx_A_ageBirth on tblA(age,birth);select * from tblA;
order by使用索引,的关键就看,是否产生了Using filesort。
![3ae553f8ca69dddf3f8298e0fa05897e.png](https://i-blog.csdnimg.cn/blog_migrate/4ad4782083f22c14d587087764df37bb.jpeg)