Link to home
Start Free TrialLog in
Avatar of blberger
blberger

asked on

Index Rebuild or Index Defrag?

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
Avatar of SQL_SERVER_DBA
SQL_SERVER_DBA
Flag of United States of America image

ASKER CERTIFIED SOLUTION
Avatar of St3veMax
St3veMax
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of blberger
blberger

ASKER

Thank you for a direct answer.  I have read the article pointed out by the other response, but it did not give me the threshold value.