Odd Performance Behavior

Last post 08-20-2008 10:27 PM by preethi. 1 replies.
Page 1 of 1 (2 items)
Active Topics My Discussions Unanswered Sort Posts: Previous Next
  • 08-20-2008 2:55 PM

    Odd Performance Behavior

    I have a bunch of stored procedures with queries using multiple joins running fine in terms of performance in my development enviornment (SQL 2005 64bit, 4 gig RAM, Dual Xeon).  When I push these same stored procedures to production (SQL 2005 64bit, 12 gid, Quad CPU, SAN attached) these queries perform horribly (some to the point of never finishing).  When I run the execution plan there are no "bad" operations and no single task hogging the majority of time.  When I use the tuning advisor it says it will give me a 99% increase but applying the recommendations never has an impact.  The only thing I have found to regain the lost performance is to break the joins up to use temp tables.  Example:

     original (select [field list] from [t1] join [t2] join [t3] join [t4] join [t5] join [t6] join [t7] where [conditions])

    converted (select field list into #tmp1 from [t1] join [t2] join [t3] - select [field list] from #tmp1 into #tmp2 join [t4] join [t5] join [t6] - select [field list] from #tmp2 join [t7] where [conditions])

    Does anybody have an insight into why I would see this behavior or recommendations as to other ways to troubleshoot?

  • 08-20-2008 10:27 PM In reply to

    • preethi
    • Top 100 Contributor
    • Joined on 07-01-2003
    • Sri Lanka
    • Posts 169

    Re: Odd Performance Behavior

    Couple of things you need to check to find the real Issue:

    • Are statistics up-to-date in Production environment.?
    • Do the Indexes in good state. (No fragmentation etc)
    • Is the table having less fragmentations
    • Is there any difference in the execution plans (between production and Dev)
    • can you check whether your queries create a blocking to other tasks?
    • Is the database placed in the best performing hard disks?
    Temporary tables help you to improve the performance by reducing the locks of 'Live" tables. Whne you join the temporary tables, there will be no locks as they are personal to you. Also as Temp tabels are created in tempdb, they can reduce the load on the live servers.

    Cheers,
    Preethiviraj Kulasingham
    MCITP:DBA
Page 1 of 1 (2 items)
Active Topics   My Discussions    Unanswered Posts


© 2000 - 2007 vDerivatives Limited All Rights Reserved.