August 7, 2009 at 11:06 am
Hello All,
I find myself stumped. I've got an automated batch that runs at a users request that seems to think the CPU is too busy to service it. SOS_SCHEDULER_YIELD is listed as the last wait type for the SPID in sys.dm_exec_requests. If I execute the statement it returns in less that 1 second, however when the automated "job" from the application executes the same SQL it can take over 30 minutes, all the while reporting a SOS_SCHEDULER_YIELD wait. What should I check next??
August 11, 2009 at 9:27 am
Hello,
1. the statement is just a statment or is a set of those?
2. It is possible to check if when the query is executed manually ALWAYS is excuted quickly and if ALWAYs the job takes so long time to finish?
SOS_SCHEDULER_YIELD means that CPU is under pressure,
check if the schedulers are waiting
SELECT scheduler_id, current_tasks_count, runnable_tasks_count, *
FROM sys.dm_os_schedulers WHERE scheduler_id < 255
Regards,
Victor Alvarez
http://sqlpost.blogspot.com
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply