The explanation that come closest at hand is that some query/ies is in msdb is slow. You could enable Query Store. Not that you can do a lot to optimise in msdb, but there could be some history table(s) that could benefit from a purge. And a job that runs every ten seconds is likely to produce quite an amount of data.
SQL Server 2022 Agent runs job to slow.
LiddellJim-7791
0
Reputation points
I have a job that essentially does nothing and takes 13 seconds to run. But the Step only takes 1 sec.
The job set is using these TSQL commands.
set nocount on
select GETDATE() as before
I have job set to run every 10 seconds but according to job history.
Job takes 13 seconds and Step only take 1.
This makes no sense. There are other programs on the system using SQL but there is no apparent bottlenecks with system resources or SQL resources. No errors reported by SQL.
Any help would be appreciated.