DBCC DBREINDEX (aka INDEX REBUILD in 2005) and Statistics Update


So - today I've been made this question.


 


"I have a DB, AUTO_UPDATE_STATISTICS option OFF (very bad idea, anyway :-)), I rebuild my indexes every week.  I do not have major changes in my database. As update statistics with fullscan is a side effect of DBCC DBREINDEX (aka INDEX REBUILD in 2005), can I say all my statistics are fine and up to date?"


 


Well... No 🙁


In fact, statistics created from DBCC DBREINDEX (aka INDEX REBUILD in 2005) are only statistics over indexed columns. Statistics over non-indexed column (the ones named something like _WA_sys) are not managed from these operations. Therefore, if you want these to be up to date you need to turn AUTO_UPDATE_SATTISTICS  ON or to schedule their management in other way.


 


More info can be found at:


Is statistics over non-indexed columns updated by index rebuild?


http://sqlblog.com/blogs/tibor_karaszi/archive/2007/08/09/is-statistics-over-non-indexed-columns-updated-by-index-rebuild.aspx


 


- Beatrice Nicolini -

Comments (0)

Skip to main content