April 26, 2011 at 1:27 am
Hi,
yestreday i run the select query query it will takes 30 seconds to completed.
today also runned sam query but it taken 3 mins to complete .so i dont know why this query taking more time.can any explani details.and in this purpose can i use any DMV by getting status of it
April 26, 2011 at 5:54 am
Without knowing lots more about your system, there's no way to know why it's running longer. It could be parameter sniffing. It could be blocking. It could be a hundred other things.
You can get information about the query through DMOs. While the query is running check sys.dm_exec_requests and you can see that query and what it's waiting on or if it's blocked. You can combine that with sys.dm_os_waiting_tasks to see what things are waiting on there in more detail. There's more you can combine in there, but it's hard to know without a lot more detail.
"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 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply