Sunday, March 25, 2012

Alter to specify a fillfactor?

For SQL2000 - I would like to be able to alter indexes on a table to specify
a fillfactor where previously a fillfactor was not defined.
I first tried this on one table in Enterprise Manager where I specified a
fillfactor of 80 for the clustered index. I ran profiler to see how it was
done. It looks like it dropped the Clustered Index and then rebuilt it.
I was hoping that there was an ALTER statement that I could run that would
effectively update the fillfactor definition so that the next time I ran
DBREINDEX it would take effect. Is this possible.
Thanks in advance!Fillfactor is not maintained during regular DML operation; it only matters
when an index is built. Therefore, there is little or no need to introduce
ALTER INDEX statement to specify a fillfactor that will not be used. When
you are ready to build/re-build index, you can specify fillfactor in DBCC
DBREINDEX/CREATE INDEX statement; after the index is built, the fillfactor
number is stored in system table for future index build to use.
Stephen Jiang
Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"TJT" <TJT@.nospam.com> wrote in message
news:%23k0I981cFHA.3040@.TK2MSFTNGP14.phx.gbl...
> For SQL2000 - I would like to be able to alter indexes on a table to
> specify
> a fillfactor where previously a fillfactor was not defined.
> I first tried this on one table in Enterprise Manager where I specified a
> fillfactor of 80 for the clustered index. I ran profiler to see how it
> was
> done. It looks like it dropped the Clustered Index and then rebuilt it.
> I was hoping that there was an ALTER statement that I could run that would
> effectively update the fillfactor definition so that the next time I ran
> DBREINDEX it would take effect. Is this possible.
> Thanks in advance!
>

No comments:

Post a Comment