Skip to content

PSBlitz v5.0.0 - optimizations and improved error handling for query execution, Excel and HTML report handling

Latest
Compare
Choose a tag to compare
@VladDBA VladDBA released this 27 Dec 17:40
d9eccc2

What's new:

Enhancements

Reduced repetitive code while improving code readability, performance, and error handling

  • The following process are now handled in their own dedicated functions:
    • Query execution - #286
    • HTML table generation - #288
    • Writing HTML files to disk - #297
    • Writing data to Excel and saving changes - #292
  • Deadlock graph file name generation is now handled in spBlitzLock_NonSPLatest.sql - #296
  • Datetime and varbinary conversions to string are now handled in the .sql scripts - #291

The above changes have slimmed down PSBlitz.ps1 to 4751 lines (4313 loc) from 7074 lines (6553 loc).

Result sets updates for stability and report file size

  • The following checks/report pages now have hard limits on the generated result sets and/or unnecessary columns have been removed:
    • Index Usage - limited to 10k records - #293
    • (Detailed) Index Diagnostics - limited to 10k records - #293
    • Raw session activity - removed columns that don't change during the execution of a request - #295
    • Stats Info - limited to 10k records ordered by modified percent descending.
    • Index Fragmentation Info - limited to 20k records ordered by avg fragmentation percent descending, size descending.
    • Wait Stats and Perfmon Stats - removed Pattern column - #290

Informational changes

  • Added warning about opening and closing Excel during PSblitz execution when Excel output is used - #287
  • Added known issue regarding using Excel while PSBlitz is running and Excel output is used - #289

Bug fixes

  • You cannot call a method on a null-valued expression. Statement $ExcelSheet.Cells.Item($ExcelStartRow, $ExcelColNum) = $DateForExcel.ToString("yyyy-MM-dd HH:mm:ss") - #285
  • Major code rewrite - optimizations and improved error handling for query execution, Excel and HTML report handling by @VladDBA in #298

Full Changelog: v4.5.0...v5.0.0