question regarding the "Included column"

  • I have created a non clustered index on a query which changed my execution plan from index scans to index seeks(along with key lookup)....Now i wanted to include all the results obtained from select statements into included columns but my select statement has around 7-8 columns.....Is it safe to include all of the selected columns into "Included columns" list???

    Regards,

    Pradeep

  • "It depends"

    Included columns are, as you know, stored in the index's leaf nodes along with the index keys.

    Depending on the size of the included columns, they will add extra overhead both on memory consumption, I/O (when the included columns are not needed by a query using the index) and storage space. On the other side the can drastically reduce CPU, locking, I/O and memory consumption for queries that can take advantage of the included columns.

  • PradeepVallabh (6/11/2010)


    Is it safe to include all of the selected columns into "Included columns" list???

    Best answer would be "Test it" and as previous post told that "it depends" so better test it

    because there are many factors responsible for it like clustered index, statistics , volume of data etc .

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • If you still find some issue post exec plan along with table defintion and index definition

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply