Re: multi-part index and when it is used?
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
Subject
Views
Written By
Posted
4945
January 12, 2005 05:05PM
2840
January 12, 2005 09:21PM
2098
January 13, 2005 07:18AM
2222
January 13, 2005 07:36AM
2042
January 13, 2005 07:39AM
2095
January 14, 2005 01:29AM
Re: multi-part index and when it is used?
2261
January 14, 2005 10:03AM
2149
January 14, 2005 04:05PM
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.