March 31, 2009 at 2:15 am
Hi ,
I have couple of sp's called in a job. Need to know the time taken for each sp's.
Can someone tell me how to find the time taken for a sp called in a sql server agent job?
Regards,
Yuva
March 31, 2009 at 2:33 am
Hi,
See the sysjobhistory table in the msdb,
In run_duration col shows the time taken of the job or steps
ARUN SAS
March 31, 2009 at 2:45 am
Hi,
Thanks for your response.
Regards,
Yuvarani
March 31, 2009 at 4:37 am
If the procedures are still in the cache you can query sys.dm_exec_query_stats to see exactly how long the procedure ran, how many resources it used, etc. You can even combine it with sys.dm_exec_query_plan to see the execution plan.
"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
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply