SQL Server Index

SQL Server Index

Hi.. I am new to Index in SQL Server. Pls provide some info aboutWhen to use Clustered Index & Non-Clustered Index?What are the advantages & dis advantages of Clustered Index?What are the advantages & dis advantages of Non-Clustered Index?

A few general rules of thumb (and remember in SQL Server everything comes with an "It depends" attached):

1. Every table should have a clustered index.2. The clustered index should be on a monotonically increasing value because the index IS the leaf level of the data (the data is physically stored in this order).3. The clustered index key should be narrow because the clustered index is included in the non-clustered indexes.4. Clustered indexes tend to be better for range queries while non-clustered indexes tend to perform better for equality queries.

Here's a link to a list blog posts by Gail Shaw (gilamonster here on SSC) that provide good index information: