Increasing performance by covering index
Before discussing covering index further, it should be understood that a covering index is not a separate type of index that has a different internal structure and algorithm. It is just a technique that is used to boost up the performance of data retrieval for the table.
You may wonder If it is not a new type of index, why do we need to use it?
Run the same SELECT
query that we ran earlier in the Increasing performance by creating non-clustered index section, which was creating the non-clustered index seek operation. But now, run this query with some more fields in the SELECT
clause, may be like this:
--running the same query we ran earlier to see behavior after --Non-Clustered Index was created with just one column extra --in the SELECT clause SELECT OrderDate,OrderID FROM ordDemo WHERE OrderDate='2011-11-28 20:29:00.000' GO
The ordDemo
table already had a non-clustered index on the OrderDate
field, so if you run this query, it should meet the non...