Posted by --CELKO-- on 12/05/15 11:29
>> columns with the most distinct values should come first. <<
This is true.
But you also have to remember that an index (a,b,c) in effect gives
you indexng for (a,b) and (a). You might also consider a covering
index to speed up queries. A covering index has all the columns needed
to answer a query so that you do not have to read the base table at
all. Also be sure that the FK and PK lists are in the same order.
[Back to original message]
|