Hello i have a db with 2 million rows my id are index so i issue the following :
SELECT * FROM table WHERE cat=3 ORDER BY id DESC LIMIT 100,50;
50 rows in set (0.00 sec)
mysql> explain SELECT * FROM table WHERE cat=3 ORDER BY id DESC LIMIT 100,50;
±—±------------±---------±------±--------------±---- -±--------±-----±
--------±------------+
| id | select_type | table | type | possible_keys | key | key_len | ref |
rows | Extra |
±—±------------±---------±------±--------------±---- -±--------±-----±
--------±------------+
| 1 | SIMPLE | table | index | NULL | id | 4 | NULL |
2818801 | Using where |
±—±------------±---------±------±--------------±---- -±--------±-----±
--------±------------+
1 row in set (0.32 sec)
this is very fast.
If i make the cat field index it takes 12 seconds.At explain it uses as key the cat field reducing the rows scanned to 400000 aprx. but using filesort which is explode the time needed to 12 seconds.
So based to my tests using indexes may not having your desired results.
Also i have another website in which indexes make a big diferrence but i think that mysql must be optimized per case there is not universal standarts.
i am sorry for my bad english.