I know how to use indexes(clustured and non clustured)
But when should i use non clustured indexes in my table.
What scenarios should be there, so as to make my column non clustured index.
I have gone throught msdn guidelines but still little bit confusion.
Should i make only unique columns as NC or should there any other columns also as NC.
If i overload my table with NC indexes then will it decrease my performance also ?
Should I use composite non-C index on columns that are foreign keys.
I know primary key should be Clustured, Unique keys should be NC but what about foreign keys.
You can only have one clustered index per table. It doesn’t have to be the primary key, but in most cases it will be.
Beyond that – it really depends on the queries & the tipping point for what indexes will be used. But defining indexes also means there will be an impact to DML – inserts, updates & deletes will take a slight performance hit.
Doesn’t matter what the column is, it’s the usage that matters for the optimizer to determine what index, clustered or otherwise, to use.