Link to home
Start Free TrialLog in
Avatar of Dan Henery
Dan HeneryFlag for United States of America

asked on

SQL Defrag

I am working with a very large reporting Database (3-4TB) that has nightly ETLs running. We also have a high percentage of fragmentation. I want to defrag the database, but due to the size of the database and the time it will probably take I will need to do this online and may not necessarily be able to run outside of business hours. Which method would least affect end users, backups, and ETLs? Should I just Reorganize, or can I Rebuild with Online parameter?
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

I once took 48 hours to rebuild a 2TB table. Took all weekend.
You need to defrag by object. Chose only the tables with more than 30% fragmentation and rebuild those.
For fragmentation level between 10%-30% it's better to reorganize.
Don't do nothing with tables with less than 10% of fragmentation.
If you do this by groups then you can split all the heavy work during the week or month depending on the available maintenance window.
SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America 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
ASKER CERTIFIED SOLUTION
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
SOLUTION
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
SOLUTION
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
SOLUTION
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
SOLUTION
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
SOLUTION
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