Results 1 to 3 of 3
Thread: Using index on ORDER BY
Jul 23, 2013, 09:44 #1
- Join Date
- May 2006
- 2 Post(s)
- 0 Thread(s)
Using index on ORDER BY
The documentation on the MySQL seems lacking in this area.
If you had a table where you typically select everything a “page” at a time using LIMIT x, y and ORDERing BY a column, is it worth adding an index to the ORDER BY column?
Let's say you had a simple table with 100k records:
id, name, html
And you're doing queries like:
SELECT * FROM table ORDER BY name LIMIT 50000, 50;
Can you optimise this or will it always use filesort?