Sql Query takes too long to execute

  • We have a huge workload to be run on our Sql 2008 server (128 GB RAM, x64, 8 (dual core) processor, Ent Edition). This query returns about 50 columns from around 15 base tables and uses various inner & outer joins. All these tables have more than 3 indexes defined on them. And the query design is from a third party application vendor. We have more than 1 million records in each of the base tables. The query seems to run forever. I did have a look at the wait-type and it is often the PAGEIOLATCH wait. I have rebuilt all the indexes to remove fragmentaion and also updated the stats. But still no avail. What would be best approach to deal with this. Im thinking of creating a covering index. Can some-one please advise.

  • Insufficient information to give you a guess, let alone best approach.

    Please post query, table definitions, index definitions and execution plan, as per http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

    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
  • As mentioned by Gail, its a lot of guess work without much details. Reply with the table definitions and other details and if possible the execution plan for the query.

    Do not edit your previous post.. post a new reply.


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

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

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