I have used the Contact table with person schema which is residing in AdventureWorks database for testing the index usage. I am describing the scenarios and places where index seek or scan will be used.
Included column is a new feature in SQL Server 2005. When you add a column as an Included column, it gets stored at the leaf level of the index and it is not part of the index key. This only works for non-clustered indexes.
Indexes are used to speedup data access in the database. By using them one can quickly find the data in a table without having to read all the data from the tables.
The index structure resembles an inverse tree similar to a directory structure. This tree begins with the 1st page of an index which is the root node which contains pointers to other pages in the index. Then comes the intermediate node or branch node which also contains pointers to leaf nodes or other branch nodes. The leaf node is the lowest level page in an index and it contains either an Row identifier (RowId) that points to the actual data in a table or it may even contain a clustering key itself.
Filtered index concept is new feature added from SQL Server 2008. A filtered index is an optimized nonclustered index, especially suited to cover queries that select from a well-defined subset of data. It uses a filter predicate to index a portion of rows in the table.
Few of my friends who wish to do a performance tuning in their servers, they asked me what are the counters that they should check that gave me an idea to prepare this document and publish across.