Saturday, February 9, 2008

Stored procedure to find fragmented indexes in SQL Server

Stored procedure to find fragmented indexes in SQL Server
SQL Server tables and indexes tend to become fragmented over time because of data modifications. In large I/O operations, performance of applications using these fragmented indexes and tables can be adversely affected.

To find fragmented tables, here are two commands you can run:
DBCC SHOWCONTIG, for SQL Server 2000 or SQL Server 2005.

No comments: