What is filtered indexes in sql server 2008? - Sql server 2008

What is filtered indexes in sql server 2008? Explain its benefits and provide an example

Filtered index in SQL Server 2008 is an index WHERE clause. A filtered index is an optimized non-clustered index. It allows for defining the filter predicate with WHERE clause at the time of creating index. The rows from the filtered index are available in B-Tree will contain the rows which only satisfy the criteria of the filter while creating the index.

The benefits of Filtered indexes are:
- Has only that row which satisfies the filter criteria defined. This results in reducing the storage space need for the index.
- The filtered index statistics are accurate and more compact. The reason is they consider only the tuples / rows in the filtered index and it reduces the cost of overhead of updating the statistics.
- The data modification impact is less by using filtered index. Because it is updated only at the time where the data of the index is impacted.
- The cost of maintenance will be reduced, because only the subset of rows will be considered which rebuilding the index.

Example:
CREATE NONCLUSTERED INDEX FI_Employee_DOJ ON Employee(DOJ)
WHERE DOJ IS NOT NULL
In the above example the NOT NULL is the filtered criteria for the index. Employee is the table and DOJ is the column name.
Resource governor - Sql server 2008
Resource Governor enables the DBA for managing the work load of SQL Server and critical system resource consumption...........
Plan freezing - Sql server 2008
Plan freezing is a new concept that allows the DBAs to persist plan guides..........
Table Value Parameters (TVP) - Sql server 2008
A user defined tables are allowed between queries using the Table Value Parameters feature of SQL Server 2008...........
Post your comment