MySQL Forums
Forum List  »  General

'Order by' clause not using indexes
Posted by: marius hagiu
Date: January 16, 2005 04:33AM

how can i make 'order by' use an index?
i have the following table:sales with columns id int(4), suma bigint(12), type char(11) and data date with indexes on (id,type) and (suma)
im issuing the following statement:
select * from vanzari order by suma
but it doesnt use the index
if i use explain i get type=ALL and using filesort
i also tried 'force index' syntax - still the same results
what indexes from the above table can 'order by' use?
pls help!!

Options: ReplyQuote


Subject
Written By
Posted
'Order by' clause not using indexes
January 16, 2005 04:33AM


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.