What is the Criteria to choose best Primary Index ?

Be careful while choosing the primary index because it affects the data storage and performance.

The following are the important tips while choosing the primary index.

1. Data Distribution.
You need to analyze the number of distinct values in the table . If the primary index of the table contains less number of null values and more distinct values,it will give better the performance.

2. Access frequency. 
The column has to be frequently used in the where clause during the row selection.
The column should be that which is frequently used in join process.

3. Volatility
The column should not be frequently changed.


No comments:

Post a Comment