Troubleshooting Parameter Sniffing In SQL Server With sp_WhoIsActive
Vložit
- čas přidán 15. 05. 2020
- If you like what you see here, you'll love my advanced performance tuning training:
training.erikdarling.com/?cou...
In this video, I'll teach you how to use Adam Machanic's free sp_WhoIsActive to help troubleshoot parameter sniffing issues live.
To get sp_WhoIsActive, head over here: whoisactive.com/ - Věda a technologie
Hey Erik, just wanted to thank you, as your parameter sniffing and “pin the plan” videos/blogs have even helped me resolved issues with my Oracle Databases. Your work is awesome and your videos are both informative and hilarious.
Aw, thanks! Happy to help!
Erik, Good info. However I have a question, when you ran spwhoisactive with get_plan=1 , how come we see an actual plan with actual run stats. Till SQL 2017 i have only see that as estimate stats or m I seeing something wrong?
It was a change Adam made in 2017: whoisactive.com/downloads/
You can smooth the path to having up-to-date sp_whoisactive by using DBATools command Install-DbaWhoIsActive:
docs.dbatools.io/#Install-DbaWhoIsActive
You could go for Automation Wonderment and have it run on a schedule.
Check your SQL Server version because you may need to enable trace flag 7412. I had to on SQL 2017, but 2019 seems to capture it by default. Have a look at Kendra's video here www.littlekendra.com/course/tuning-a-stored-procedure-sqlchallenge-1-hour-10-minutes/solution-scripts-trace-flag-7412-and-live-query-plans/