|
-
In a concatenated Index, the order of columns are important. The leading (first) column should be of a high cardinality value, followed by other columns in that order.
Let us consider an example:
Table T has 5 columns, viz colA, colB, colC , colD and colE. Now you want a concatenated index on columns colC + colB+ColE.
Before creating the index, check the distinct values of columns C, B and E.
C has 200 distinct values, B has 400 and E has 1000 values.
In that case, I would prefer to create the index with ColE+ColB+ColC.
Because of the high cardinality in the first columns, your index will be evenly balanced.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|