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
5261
January 12, 2005 05:05PM
3036
January 12, 2005 09:21PM
2254
January 13, 2005 07:18AM
2386
January 13, 2005 07:36AM
2200
January 13, 2005 07:39AM
2240
January 14, 2005 01:29AM
Re: multi-part index and when it is used?
2421
January 14, 2005 10:03AM
2306
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.