Unanswered: How can I force MySQL to use the index in sorting the records?
I run the explain command on this select statement and I always get filesort in the results (in the extra column) even though I have an index on the postid column (primary key), although not related but threadid is also indexed by the way:
explain select * from forumposts where threadid = 5 order by postid;
How can I force MySQL to use the index in sorting the records? Any suggestions?
Thanks for your reply, actually I thought about this but I don't really want to create another index just for sorting esp. not an index on mutiple columns, I'm worried about the performance of inserts, is there any other solution? I read about FORCE INDEX but I believe it's not used for order by ..