June 23, 2017 at 5:39 am
How to find wait events of a sql in SQL server?
Thanks & Regards
Krishna
June 23, 2017 at 5:45 am
Do you mean you're looking for SP's on your database/Server where they use the WAITFOR command? You could use something like Redgate's SQL Search add on (which is free), and search for "WAITFOR".
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
June 23, 2017 at 5:53 am
Hi,
maybe you could read this post from paul randal:
https://www.sqlskills.com/blogs/paul/wait-statistics-or-please-tell-me-where-it-hurts/
kind regards,
Andreas
June 23, 2017 at 6:38 am
Can you be a little more explicit about what you're looking for?
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
June 23, 2017 at 6:42 am
Extended Events have a mechanism for doing this. First, you need two events (or maybe three), rpc_completed (and/or sql_batch_completed, or even one of the statement completed events) and the wait_completed event. Combine these with tracking event relations and you'll be able to see all the waits for a given query. I would strongly recommend putting good filtering on this because you'll be collecting a lot of data, but it ought to get the job done.
"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
June 23, 2017 at 10:50 pm
GilaMonster - Friday, June 23, 2017 6:38 AMCan you be a little more explicit about what you're looking for?
We have some data warehouse Quires, I improved performance these of Quires with help of indexes. Still client not happy about it's performance .
So want to analyze it's wait events to find performance issues.
June 24, 2017 at 7:00 am
krishna83 - Friday, June 23, 2017 10:50 PMGilaMonster - Friday, June 23, 2017 6:38 AMCan you be a little more explicit about what you're looking for?We have some data warehouse Quires, I improved performance these of Quires with help of indexes. Still client not happy about it's performance .
So want to analyze it's wait events to find performance issues.
Check the execution plans to see how the queries are being resolved. It's a great way to figure out what's happening with the query. Wait stats are also useful, but they're going to point out what's happening with the OS and the hardware. You still have to address the query. That's where the execution plan comes in.
"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
June 24, 2017 at 6:24 pm
Krishna, if you need more information on execution plans, Grant's book on the topic is available for download from this site at http://www.sqlservercentral.com/articles/books/94937/.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply