Find Enabled Recommended Optimizations Which Have No Schedule

When enabling optimizations, you might want to make sure that each optimization has at least one schedule. This ensures that optimizations are refreshed regularly in order to return recent data.

For verifying that every optimizations is covered by a schedule, you can run the following code which will return all optimizations that currently lack a schedule:

SELECT ro.id   ,ro.Matchdescriptor   ,sj.description   ,sd.* FROM   "SYSADMIN.RecommendedOptimizations" ro   left join "SYSADMIN.ScheduleJobs" sj   on ro.id = sj.groupId   left join "SYSADMIN.Schedules" sd   on sj.ID = sd.jobID WHERE   "ro"."Enabled" = true   and sd.ID IS NULL;;

1 Like