September 13, 2017 at 9:03 am
My database file size doubled after rebuilding all indexes. The mdf file went from 2.5G to 5.5GB. I did not specify a fill factor, default is 0.
I understand that this is normal, since the database needs somewhere to put the new indexes. What I don't understand is the free space still shows minimal. Why wouldn't the space be freed when the old indexes are dropped?
Thanks in advance!
Dan
September 13, 2017 at 9:08 am
If you mean the mdf file didn't shrink after rebuilding the indexes that is expected. You should see free space in the DB if you look in SQL Server but it won't automatically release that space back to the OS. That doesn't just apply to index rebuilds, once SQL has allocated space for the mdf it won't free it unless a shrink operation is run.
September 13, 2017 at 9:16 am
ZZartin - Wednesday, September 13, 2017 9:08 AMIf you mean the mdf file didn't shrink after rebuilding the indexes that is expected. You should see free space in the DB if you look in SQL Server but it won't automatically release that space back to the OS. That doesn't just apply to index rebuilds, once SQL has allocated space for the mdf it won't free it unless a shrink operation is run.
My question is... why would there be no free space after the index rebuild? The size of the mdf doubled, but it isn't shown in the free space.
September 13, 2017 at 9:32 am
Oops, I just noticed I was looking at the wrong mdf file. Sorry!
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply