• Joshua Feierman - Friday, October 23, 2015 5:54 PM

    Hi Makis,That's an interesting suggestion. I'll have to think about that one a bit, as it would require having a table somewhere where the indexes that the procedure initially disables are stored, and I was trying to avoid having any footprint beyond a procedure. Do you envision it as keeping that information stored until you run it in enable mode, then deleting it? What about if multiple processes are calling it at the same time, say for different databases or sets of tables; how do you think it should handle that?Thanks for the feedback in any case.-Josh

    Why not have a table with all disabled indexes in? You could even write this into a database or server trigger so it wouldn't be a manual operation, then just don't re-enable any that are in the table.

    EDIT: You would obviously need to disable the trigger when you run this process, but it only needs to be for the initial disable of the indexes.