January 15, 2002 at 10:03 am
Does reindexing automatically update statistics? I know that creating a new index updates statistics, but I am not sure about dbcc reindex.
Thanks.
January 15, 2002 at 10:04 am
I am using sql server 7.0 and 2000.
thanks.
January 16, 2002 at 7:09 am
Reindexing does not update statistics. Use sp_updatestats, or turn on Auto Update Stats in the db properties. -JG
-JG
January 16, 2002 at 8:10 am
Dont think I agree with you on that one JG. Perhaps I am wrong, but if you just rebuilt an index and kept the old stats you'd have a total mess. I agree that you can/should turn on the auto stats or could just run sp_updatestats to update them.
Andy
January 16, 2002 at 8:20 am
If auto update statistics is on, will the statistics get updated when a reindex is done? I think the auto update statistics only kicks in when the data pages hits a certain level changes.
thanks.
January 18, 2002 at 6:54 am
Might of miscommunicated on the last entry. I was trying to communicate that it is necessary to update the stats after rebuilding the index.
richcoulson if you look in Books online under Auto Update Stats, it will have all the information on when an update occurs, and some good information of when it might not be a good idea to have them on.
One last thing; Profile your database and capture some of the incomming calls. Then look through the trace for "Missing Column Statistics. All out-of-date and missing stats are captured in profiler.
-JG
February 5, 2002 at 5:33 am
Personally I would use DBCC UPDATEUSAGE to clean up any inaccuracies in the sysindexes table.
February 13, 2002 at 3:08 pm
If u run dbcc dbreindex and then run DBCC SHOW_STATISTICS u will see that the stats have been updated!
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply