MySQL Forums
Forum List  »  Performance

avoid file sort for IN() ORDRE BY
Posted by: Xuefer Tinys
Date: January 24, 2005 01:27PM

Select .. From table
Where index_part_1=1
Order index_part_2 DESC
LIMIT 10

is ok, no filesort

but
Select .. From table
Where index_part_1 IN(1,2,3,4)
Order index_part_2 DESC
LIMIT 10

is sick :(
how can i avoid filesort?

having filesort means LIMIT can only be done at SortTime

Options: ReplyQuote


Subject
Views
Written By
Posted
avoid file sort for IN() ORDRE BY
3341
January 24, 2005 01:27PM
1949
January 30, 2005 06:41AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.