I'm pretty new to DB2 and like to know if column cardinality can play
a role in choosing the column order in a composite index.
In Oracle, it appears composite indexes of different column orderings
perform the same regardless of column cardinality (http://
asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:
5671539468597):
..... for a query that references all of A, B, C the above three
indexes will perform more or less the same -- regardless of the
selectivity of A, B, or C. Benchmark in the book ;)
In SQL Server, however, it is claimed that column ordering is very
im****tant (http://www.mssqlcity.com/Tips/tipInd.htm):
If you create a composite (multi-column) index, try to order the
columns in the key as to enhance selectivity, with the most selective
columns to the leftmost of the key.
Can anybody comment on what we should expect from DB2? Is there any
official info on this topic from IBM? I tried but couldn't find much
info on this topic from IBM.
Thanks a lot.


|