March 8, 2013 at 5:34 am
Hi Folks,
at times with heavy workload, my devs tell me they receive a lot of database timeouts. A the database I got 2 stored procs which get heavily executed. If I run the queries at ssms they take about 1000 ms. The execution plan looks good. But the cpu goes up to 100% and I got a lot of SOS_SCHEDULER_YIELDS. I've allready gone through all the points of chapter 3 in the book "the accidental dba", but none of the reasosn fit. Why is the query so ressource intensive?
Greetz
Query Shepherd
March 8, 2013 at 5:39 am
Can you disclose the procedures, tables, indexes, execution plans and any other information related to the objects in question so that we can take a look.
March 8, 2013 at 5:45 am
Please post table definitions, index definitions and execution plan, as per http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Also note that you need to tune your workload, not your individual queries.
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
March 11, 2013 at 10:01 am
Seems to be gone...weird...I'd come back with all the info, when the problem would emerge again. Thanks!
Greetz
Query Shepherd
March 11, 2013 at 10:46 am
running in SSMS isn't always the same as running from an application, the set options might be different for example.
if it's only a couple of procs why not profile to capture the stats when they run - you could also extract the plan from cache when it's bad and compare to the plan you get when you run it.
Sorry don't have the book so have no idea what all the steps there might be.
probably a silly question but the procs don't start sp_ ??
[font="Comic Sans MS"]The GrumpyOldDBA[/font]
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply