Skip to content

Instantly share code, notes, and snippets.

View JonasNjopOlsson's full-sized avatar
🏠
Working from home

Jonas Olsson JonasNjopOlsson

🏠
Working from home
View GitHub Profile
@JonasNjopOlsson
JonasNjopOlsson / Hallengren - Report on time taken to run commands.sql
Last active June 1, 2025 06:52
Hallengren SQL Server Maintenance Solution - Report on time taken to run and prepare for running commands
/*
=============================================================================
Report on time taken to run and prepare for running Hallengren commands
NOTE: Specifically UPDATE_STATISTICS can take a long time on databases with many partitions.
Finding command types get statistics for:
SELECT DISTINCT CommandType FROM dbo.CommandLog ORDER BY CommandType;
=============================================================================
*/