sql-scripts
sql-scripts copied to clipboard
Fixed issue where deleted tables/indexes result in failures
We encountered an issue where the script will become "stuck" if the next index to work on has been deleted, or it's associated table has been deleted.
We run the script nightly with a 2 hour time limit, so it usually takes a few days for it to process all the fragmented indexes. If during that time, we remove a table/index that was in the queue for processing then the script would stop processing.
This change attempts to skip an index if it's going to fail.
Good catch. I need to tweak my regression tests to check for this condition. It's now on my TODO.
Thanks!