dataplat / dbatools

🚀 SQL Server automation and instance migrations have never been safer, faster or freer
https://dbatools.io
MIT License
2.39k stars 788 forks source link

Get-DbaWaitStatistic is three years behind the Paul Randall script it copies #9251

Closed ReeceGoding closed 4 months ago

ReeceGoding commented 4 months ago

Summarize Functionality

I've recently been trying to use Get-DbaWaitStatistic on a SQL Server 2019 machine. Because it does not currently filter out extremely common benign waits introduced in 2019, the results have been useless. The cause of this is due to Get-DbaWaitStatistic being three years behind the Paul Randall script it copies. This issue is for getting us up to date with it. See my pull request #9249 .

Is there a command that is similiar or close to what you are looking for?

Yes

Technical Details

Our last update to the ignore list of Get-DbaWaitStatistic was from https://github.com/dataplat/dbatools/issues/3729. The commit can be found here. That commit was based off of the "June 13, 2018" version of Paul's script. The version of his website from that time is seemingly lost, but I found what looks to be the same script here. With his newest version ("October 1, 2021") at hand, it makes it pretty easy to work out what updates we've missed.

The categories for the wait types seem to come from here, but it's not up to date so I've had to put most of them down as "other" even when it's obvious which place they should be in. I've also put the waits from the last update to the ignore list in to categories.