Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

data file shrink causes *massive* index fragmentation

$
0
0

Why does this happen? A data file shrink operation works on a single file at a time, and uses the GAM bitmaps (see Inside The Storage Engine: GAM, SGAM, PFS and other allocation maps) to find the highest page allocated in the file. It then moves it as far towards the front of the file as it can, and so on, and so on. In the case above, it completely reversed the order of the clustered index, taking it from perfectly defragmented to perfectly fragmented.

from below

http://www.sqlskills.com/blogs/paul/post/why-you-should-not-shrink-your-data-files.aspx

Can Someone give more clarity on this...


Thanks


Viewing all articles
Browse latest Browse all 12963

Trending Articles