Clustered index:The data stored in the table is stored in the order of indexes. the retrieval efficiency is higher than that of normal indexes, but it has a greater impact on the addition, modification, and deletion of data.
Non-clustered index:It does not affect the data storage sequence in the table. The retrieval efficiency is lower than that of clustered indexes, and has little impact on data addition, modification, and deletion.
A table has only one clustered index and multiple non-clustered indexes.
The following table describes the applicability of clustered indexes and non-clustered indexes:
Action Description |
Use clustered Index |
Use non-clustered Index |
Columns are sorted by group. |
Ying |
Ying |
Returns data within a certain range. |
Ying |
Should not |
Returns the exact matched data. |
Should not |
Ying |
One or few different values |
Should not |
Should not |
Different decimal values |
Ying |
Should not |
Different values of large numbers |
Should not |
Ying |
Frequently updated Columns |
Should not |
Ying |
Foreign key column |
Ying |
Ying |
Primary Key Column |
Ying |
Ying |
NOTE: If primary key columns are identified and often used for range queries, clustering indexes are applicable; otherwise, non-clustering indexes are applicable.
Here is a detailed discussion: http://blog.csdn.net/ChinaOffLineSoft/archive/2006/04/11/659725.aspx