Improving performance of SQL Agent job history sampling
Published 21 October 2021
Maintenance of msdb.dbo.sysjobhistory is a routine part of administering a SQL Server instance. If you have opted to maintain very large volumes of job history the following index could help to improve the performance of SQL Monitor's query running on the monitored server:
CREATE NONCLUSTERED INDEX [rg_job_history] ON [msdb].[dbo].[sysjobhistory]
You may change the name of the index, SQL Monitor does not use index hints for this index.