• thbaig (7/3/2015)


    Grant Fritchey (7/3/2015)


    If the execution plans are the same then it's likely down to resources. Take a look at the waits statistics before and after the run in order to determine the waits that the query experiences in the development environment. That will give you a very strong indication of where the likely bottleneck is.

    can you guide me how to do that ?

    Just answered this on another question.

    Two options. The easy option, query sys.dm_os_wait_stats before and after you run the offending query. Compare the differences. While easy, it won't be accurate. To get a very accurate measure of exactly what's going on, use extended events. Paul Randal has a blog post on this topic.[/url]

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning