Cluster Index in Inculude Column

  • I have a table and ı have an update query and ı look at the execution plan of query SQL SERVER suggest to me use clustered index in index include column is any meaning of these why?

  • Can you copy and paste what SQL Server is suggesting into a post here? Would help.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • /*

    The Query Processor estimates that implementing the following index could improve the query cost by 99.9906%.

    */

    /*

    USE [DB]

    GO

    CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>]

    ON [dbo].[TBL] ([STOCKREF],[INVENNO],[DATE_])

    INCLUDE ([LOGICALREF])

    GO

    */

  • ESAT ERKEC (5/2/2012)


    /*

    The Query Processor estimates that implementing the following index could improve the query cost by 99.9906%.

    */

    /*

    USE [DB]

    GO

    CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>]

    ON [dbo].[TBL] ([STOCKREF],[INVENNO],[DATE_])

    INCLUDE ([LOGICALREF])

    GO

    */

    SQL Server is suggesting you to add an index, and the you can use the script given to create it

    The estimated improvement in performance by adding this index is 99.9906%

    Now, its up to you to decide if you want to accept the suggestion or not

    Its not mandatory or an error, just a suggestion by SQL Server


    Kingston Dhasian

    How to post data/code on a forum to get the best help - Jeff Moden
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • It is oke but LOGICALREF is an clustered index column i can why it is suggest that?

  • ESAT ERKEC (5/2/2012)


    It is oke but LOGICALREF is an clustered index column i can why it is suggest that?

    Why shouldn't it be suggested?

    If that include is necessary for the query to use the index, then that include should be explicitly stated.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Oke i will try it...

Viewing 7 posts - 1 through 7 (of 7 total)

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