olahallengren / sql-server-maintenance-solution

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

Issue #653 - Update IndexOptimize - Add Time Limit Estimate Command Duration #654

Open siweston opened 2 years ago

siweston commented 2 years ago

Update IndexOptimize - Add @TimeLimitEstimateCommandDuration (options: Min,Avg,Max) - Estimate duration of index and statistics commands for an object - skipping if the current time + duration exceeds the time limit. Also remove TimeLimit check around listing indexes in current database otherwise you receive error 'The following objects in the @Indexes parameter do not exist' running when exceeding time limit