@ErikReasonableRatesDarling Your "Ola Stats Only Job.sql" script has a comment in the header stating Targets the master database but in the code you USE msdb.
SELECT
d2.*
FROM dbo.do_it AS d
CROSS APPLY
(
SELECT TOP (1)
*,
wtf = dbo.wait_for(d2.wait_for)
FROM dbo.do_it AS d2
WHERE d.id = d2.id
ORDER BY
wtf
) AS d2;
@Zikato Ho ho. Yeah, I just meant sharing code via gists is tedious and infuriating. Easy to miss supplemental scripts as I did and there's no really easy way to copy code to the clipboard.
Thank you, Erik. I thought that this was simple, but merely reading the blogs was not enough. Once I studied them, the revelation blew me off of my chair. Your posts are like being covered in jet fuel. — J. Mini55 mins ago