February 29, 2008 at 7:33 am
Does issuing a rebuild/reorganize or dbreindex set the fillfactor back to the original value, or the database default?
Thanks
February 29, 2008 at 7:40 am
It's in Books Online under "DBCC Reindex"...
fillfactor
Is the percentage of space on each index page to be used for storing data when the index is created. fillfactor replaces the original fillfactor as the new default for the index and for any other nonclustered indexes rebuilt because a clustered index is rebuilt. When fillfactor is 0, DBCC DBREINDEX uses the original fillfactor specified when the index was created.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 29, 2008 at 7:42 am
Ok, but what if you don't pass a fillfactor? Does it default to it's original value or the database default?
Does the same thing apply to rebuild/reorganize?
February 29, 2008 at 8:08 am
Adam -
From testing I performed a while ago, issuing the rebuild with no specified fillfactor will rebuild using the latest specified Fillfactor.
Meaning - each time you specify a fillfactor - that becomes the new default. That default will be used until you specify a new one.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
February 29, 2008 at 8:09 am
Perfect, and just to confirm, it is the same between 2k (dbreindex) and 2k5 (rebuild/reorganize)?
Thanks again
February 29, 2008 at 8:18 am
I was testing using the Alter...rebuild, since the DBCC REINDEX is falling out of favor these days.
That probably bears confirmation. Should be easy to verify with a small table/index.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
February 29, 2008 at 8:20 am
Matt Miller (2/29/2008)
I was testing using the Alter...rebuild, since the DBCC REINDEX is falling out of favor these days.That probably bears confirmation. Should be easy to verify with a small table/index.
Yeah this is just for the 2k servers.
February 29, 2008 at 8:31 am
Adam Bean (2/29/2008)
Ok, but what if you don't pass a fillfactor? Does it default to it's original value or the database default?Does the same thing apply to rebuild/reorganize?
Heh... Who the heck ever trusts a default that could change with tomorrow's hot fix? 😉 If you're not gonna pass the fillfactor, have the code treat the missing fillfactor as "0".
--Jeff Moden
Change is inevitable... Change for the better is not.
February 29, 2008 at 8:45 am
The default is the one that has been passed on the last rebuild command and does not take the systems initial default value.
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
February 29, 2008 at 8:45 am
Adam Bean (2/29/2008)
Matt Miller (2/29/2008)
I was testing using the Alter...rebuild, since the DBCC REINDEX is falling out of favor these days.That probably bears confirmation. Should be easy to verify with a small table/index.
Yeah this is just for the 2k servers.
As a second thought -
If my memory doesn't fail me - there is no alter index...rebuild syntax in 2000 - so the only syntax that applies is the DBCC syntax. You just drop and create instead of rebuilding in 2000. I would then think that Jeff's BOL quote applies.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
February 29, 2008 at 8:47 am
So is it best practice than to find the original value of the index fill factor and pass that into the rebuild?
February 29, 2008 at 8:50 am
According to the BOL quote - using 0 to pass in would serve the same purpose as passing the original fillfactor. Meaning 0 = use the original fillfactor.
I'm not sure that's best practice or not - but it sure sounds like that's what it's for.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply