When we delete huge amounts data from a table, what should be the best thing to follow: Shrink the file group first and rebuild indexes, or Rebuild indexes then shrink the file group?
Asked
Active
Viewed 345 times
1 Answers
4
Shrink then rebuild. Because
Shrink introduces fragmentation that rebuild removes. And
Shrink doesn't leave the right amount of free space in the files, but the amount of new space required by the rebuild is a reasonable buffer to minimize file growth during normal operations.
David Browne - Microsoft
- 49,000
- 3
- 53
- 102