Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reorganize / rebuild indexes
Message
 
 
À
01/06/2009 14:48:03
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01403038
Message ID:
01403040
Vues:
39
This message has been marked as a message which has helped to the initial question of the thread.
>In SQL 2000 (and still in SQL 2005 - but not being continued) DBCC SHOWCONTIG has been used to capture index statistics. With a cursor, all indexes of all tables (of all DBs) could have their stats extracted with one procedure.
>
>In SQL 2005, sys.dm_db_index_physical_stats is the recommended method. This gives the information differently. Wtih all arguments set to NULL, all of the index information can be selected without the need for a cursor. It gives database_id and object_id, though, not the names.
>
>My question is this: What would be the best way to have a procedure that uses
>
> ALTER INDEX ALL ON ... REORGANIZE and
> sys.dm_db_index_physical_stats
>
>to update all indexes (on all tables, and all DBs) that are more than 20% fragmented??
>
>Your help is greatly appreciated.

Not sure if this is helpful

http://204.9.76.233/Community/forums/t/2163.aspx
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform