SQl Query performace

  • Thanks to all of repliers,

    My problem is mostly solved by your tips and Gail Shaw articles about Indexing.

    My query is now only takes longer time for one character searching.

    Any tips for further improvement is appreciated.

    Just one other question,

    If I have three columns A,B,C.

    Some times I search with only A, sometimes with only B, sometimes with only C, sometimes with A and B, sometimes with A and C, sometimes with B and C and sometimes A, B and C.

    Whether here i use single composite index or single index for A,B and C or something else?

    Where to learn more about execution plan?

  • abcim (9/25/2010)


    Whether here i use single composite index or single index for A,B and C or something else?

    Something else. You want the minimum number of indexes that will satisfy all the queries. With the combinations you indicated, I'd go for something like the following indexes:

    (A,B,C)

    (B,C)

    (C,A)

    That will allow all the combinations you mentioned to seek on a single index to execute.

    Where to learn more about execution plan?

    Grant's book.

    http://www.sqlservercentral.com/articles/books/65831

    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
  • Thank you very much Gail.

    I really appreciate your help.

Viewing 3 posts - 31 through 32 (of 32 total)

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