Indexing Suggestion Needed for Performance

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

  • 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
  • Thanks Gail..!!

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

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