I have DBs that have indexes that are fragmented in various levels from 30% to 99% because index maintenance was never scheduled/ created. I know that it is easier to INDEXDEFRAG than to Rebuild the INDEX (Less time and no long term locks on the table), but there must me a specific point where rebuilding would be better than tryig to defrag the index. (I know that rebuilding would need to be done in non-production hours or late at night). But I want to set up a process that checks the fragmentation of an index and if the %of fragmentations is over a specific amount, set that index for rebuilding and if it is less than a specifi % set the index for defraging. Does anyone have an idea where / what that % might be? (Lets use a simple index of one column with 500K records as an example).
Thanks in advance