MSBI (SSIS/SSRS/SSAS) Online Training

Tuesday, December 8, 2009

SQL SERVER-Rebuild Indexes AND Update Statistics

Hi,
Rebuild Indexes and Update statistics is very important to improve the performance of the data.
SQL SERVER 2005 uses ALTER INDEX syntax to reindex database. SQL SERVER 2005 supports DBREINDEX but it will be deprecated in future versions.When any data modification operations (INSERT, UPDATE, or DELETE statements) table fragmentation can occur. DBCC DBREINDEX statement can be used to rebuild all the indexes on all the tables in database. DBCC DBREINDEX is efficient over dropping and recreating indexes.
Execution of Stored Procedure sp_updatestats at the end of the Indexes process ensures updating stats of the database.
We have 2 good scripts to implement to achive our requirements.
Please have a look into this:
http://weblogs.sqlteam.com/tarad/archive/2006/08/14/11194.aspx

http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/

No comments: