MySQL Forums
Forum List  »  Performance

Re: multi-part index and when it is used?
Posted by: Jonathan Cochran
Date: January 14, 2005 10:03AM

MySQL will only use 1 index per instance of a table per query.

So in your above example it would be better to use the multi-part index (a,b), because if you created two single column indices, MySQL would only use which ever one it thinks is more selective. I believe some of this may be changing in MySQL 5.0

Harrison, can correct any mistakes that I have made... =P


Jonathan Cochran

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: multi-part index and when it is used?
2164
January 14, 2005 10:03AM


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.