mysql> show profiles;
+----------+------------+------------------------------------------------------
--+
| Query_ID | Duration | Query
|
+----------+------------+------------------------------------------------------
--+
| 1 | 0.00043675 | select id,title from article where id>=10 and id<=20
|
| 2 | 0.08359450 | select id,title from article where id between 10 and
0 |
+----------+------------+------------------------------------------------------
id列上有索引,第一种会索引范围扫描,第二种是全表扫描