I have a database which has logical fragmentation in some of the tables.
I have scripts that now will run an update_statisitics with fullscan on all
the objects.
I also have a job that perfroms a dbcc dbreindex on the indexes if the
logical or physical scan density returned from dbcc showcontig is above
certain thresholds.
My question is would it make any difference in running an update-statistics
with fullscan prior to any reindexing tasks instead of running update stats
after the dbcc dbreindex, or does it not matter? Would the dbcc showcontig
benefit from having an updated statistics with full scan performed with all
the statistics updated be preferable?
When an index is built/rebuilt, the stats are completely done with a
fullscan, so doing both doesn't buy you anything.

Signature
Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
I have a database which has logical fragmentation in some of the tables.
I have scripts that now will run an update_statisitics with fullscan on all
the objects.
I also have a job that perfroms a dbcc dbreindex on the indexes if the
logical or physical scan density returned from dbcc showcontig is above
certain thresholds.
My question is would it make any difference in running an update-statistics
with fullscan prior to any reindexing tasks instead of running update stats
after the dbcc dbreindex, or does it not matter? Would the dbcc showcontig
benefit from having an updated statistics with full scan performed with all
the statistics updated be preferable?
Tom Frost - 10 Mar 2008 20:57 GMT
does updating the statistics provide any additional information regarding
potential fragementation that would be used within dbcc shpwcontig?
> When an index is built/rebuilt, the stats are completely done with a
> fullscan, so doing both doesn't buy you anything.
[quoted text clipped - 12 lines]
> benefit from having an updated statistics with full scan performed with all
> the statistics updated be preferable?
Tibor Karaszi - 10 Mar 2008 21:33 GMT
Nope. There is no fragmentation level info in the statistics (no "physical state").

Signature
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
> does updating the statistics provide any additional information regarding
> potential fragementation that would be used within dbcc shpwcontig?
[quoted text clipped - 15 lines]
>> benefit from having an updated statistics with full scan performed with all
>> the statistics updated be preferable?