Monday, November 12, 2012

About included columns


It can be only used with non-clustered indexes.

The key columns are stored in all level of an index, while included columns are stored only at leaf level of an index.

Typical usage of included columns is to create a covering index, which contains all columns required by a query, either key columns or included columns. It's a way to remove bookmark(key look up)/RID look up in execution plan. (decreasing I/O required to return data.)

Pros:

-- The non-key columns do not count towards the limitation of 900 bytes key size or 16-columns.

--The non-key columns can use data types not allowed by index key columns;
(all data types except the varbinary (max) columns that have the FILESTREAM attribute, the legacy text, ntext, and image are supported.)

-- Major solution to expensive bookmark look up

Cons:

-- Using of included columns will result in higher disk space usage in order to store the index,
-- An increase in I/O demands
-- Lower buffer cache efficiency
-- Reduced performance of data modification operations

No comments: