olahallengren / sql-server-maintenance-solution

SQL Server Maintenance Solution
https://ola.hallengren.com
MIT License
2.91k stars 756 forks source link

IndexOptimize - Feature to estimate duration for completing index or statistics operations if a time limit is set and skip if exceeds #653

Open siweston opened 2 years ago

siweston commented 2 years ago

If a time limit has been set some indexes or statistics operations could end up running over due to the size and how close to the end of the window the operation starts.

Using the data collected in the CommandLog table we could use this to estimate how long the operation may take and skip processing the object if it exceeds the time limit.

This feature is aimed at SQL < 2017 as the MAX_DURATION setting is available.