Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimizing deletion in batch
Message
De
07/01/2014 15:49:07
 
 
À
07/01/2014 15:02:56
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01591061
Message ID:
01591472
Vues:
33
>OK, let's start here - let's get the fragmentation level of your tables/indexes.
>
>Go ahead and run this code.....
>
>Note at the bottom I put a where condition on - to get the frag levels for a single table. So you can filter on a table, or just omit the where clause and get the frag level for all tables.
>
>Let me know the column values for the table(s) in question. Anything over about 30% means the table should be reindexed, and anything well over 50% can definitely be an indicator of sluggish performance. If all the numbers on your major tables are under 30% then the problem is likely elsewhere.
>
>
>SELECT OBJECT_NAME([OBJECT_ID])  AS TableName,   
>       avg_fragmentation_in_percent AS Fragmentation,
>       fragment_count, page_count
>       FROM sys.dm_db_index_physical_stats
>            (DB_ID(), null, null, null, null)
>            where OBJECT_NAME([OBJECT_ID]) = 'PurchaseOrderHeader' 
>
Thanks, I have enormous numbers on the percentage column on pretty much all big tables.

I will have to perform some indexing and see how it goes.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform