MSSQLTips.com - your daily source for SQL Server tips

Google
 
Web mssqltips.com

ESSENTIALS: Home | Tips | Search | Categories | Top 10 | Products | Authors | Blogs | Forums | Webcasts | Advertise | About
What Difference Update Stat and ReIndex - MSSQLTips

MSSQLTips

MSSQLTips.com - your daily source for SQL Server tips
Welcome to MSSQLTips Sign in | Join | Help
in Search

What Difference Update Stat and ReIndex

Last post 10-20-2008 10:39 AM by tosscrosby. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-19-2008 10:52 PM

    What Difference Update Stat and ReIndex

    What is difference between Update Stat and DBCC DBREINDEX ..........

    after doing dbcc dbreindex database size become smaller

     

    Filed under:
  • 10-20-2008 2:16 AM In reply to

    • @tif
    • Top 10 Contributor
    • Joined on 07-28-2008
    • Posts 22

    Re: What Difference Update Stat and ReIndex

    DBCC DBREINDEX is offline process, used in case of heavy insert delete and updates performed on base table. instead of droping and creating indexes for a table, all indexes in a table can be rebuild in one statement through DBCC DBRINDEX statement. This statement is deprecated in SQL Server 2008 now you may use alter index statement. Alter index can also be used in SQL Server 2005.

    and using sp_updatestats at the end of the Indexes process ensures updating stats of the database. 

    The question about smaller size of database as a result of DBCC DBRINDEX requires more information.I see no reason for decrease in size.

    ====================================
    Atif Shehzad
    DBA PRAL
  • 10-20-2008 10:39 AM In reply to

    • tosscrosby
    • Top 10 Contributor
    • Joined on 04-15-2008
    • in front of my computer
    • Posts 47

    Re: What Difference Update Stat and ReIndex

    There is no reason to update stats after doing a reindex, the stats are updated via the process anyway. As far as seeing a reduction in database size, you could, depend on the size and framgmentation of your indexes. I wouldn't think the size difference would be substantial but I could see it fluctuate a little.

Page 1 of 1 (3 items)