lundi 5 janvier 2015

mysql multiple column index Cardinality order


consider a table with Multiple-Column Indexes on columns X and Y.



INDEX name (X,Y)


If X has High-cardinality than Y i.e., for each if X is less unique than Y, what should be the order of multiple-column index X,Y or Y,X.


If it is X,Y there is going to be lesser number of rows with same X value. will this improve the performance because B-tree look up of X will be faster





Aucun commentaire:

Enregistrer un commentaire