question

Sharma avatar image
Sharma asked

DBCC SHRINKDATABASE V/S INDEX FILL FACTOR {%}

Hi, Does shrinking database reclaim index fill factor {%} from page also or fill factor % will be available still in page?
indexfillfactor
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Magnus Ahlkvist avatar image
Magnus Ahlkvist answered
DBCC SHRINKDATABASE will move datapages, not data within datapages, so the fillfactor should remain the same. What will happen though is that you are likely to get fragmentation from shrinking database files.
5 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sharma avatar image Sharma commented ·
As I know shrink database will increase index fragmentation because it moves data pages so we can DE-fragment indexes through reorganization of indexes, Is there will be more benefit If we do rebuild instead of reorganization after shrink or Re-organization is sufficient?
0 Likes 0 ·
Magnus Ahlkvist avatar image Magnus Ahlkvist commented ·
If you have much fragmentation, you get a better result using rebuild than reorganize. But reorg and rebuild are likely to grow your database file again.
0 Likes 0 ·
Sharma avatar image Sharma commented ·
As I know Reorg only grow ldf file not mdf but rebuild grow mdf not ldf. (Simple Recovery Mode).
0 Likes 0 ·
Magnus Ahlkvist avatar image Magnus Ahlkvist commented ·
You're right - reorg won't grow datafile. But on the other hand - it won't defragment very effectively either :)
0 Likes 0 ·
Håkan Winther avatar image Håkan Winther commented ·
+1 I agree with Magnus. If you want to keep the growth to a minimum when using rebuild, you should specify the SORT_IN_TEMPDB option.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.