Indexing Suggestion Needed for Performance

  • rollercoaster43

    Ten Centuries

    Points: 1305

    Hi All.

    I have a query which say

    Scenario 1 :

    select colmA from table1 where colmB = @colmB and ColmC=@columC and colmD= @colmD

    Now, here if I create a non clustered covering index for performance, what should it be like to avoid table scan?

    Scenario 2 :

    select colmA from table1 where colmB = @colmB and ColmC=@columC and colmD<> @colmD

    Now,here is it possible to create proper indexing to avoi d a table scan when in <> operator is used in the query??

  • Gail Shaw

    SSC Guru

    Points: 1004424

    http://www.sqlservercentral.com/articles/Indexing/68636/

    That should answer most of your questions.

    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
  • rollercoaster43

    Ten Centuries

    Points: 1305

    Thanks Gail..!!

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

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