Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing deletion in batch
Message
From
07/01/2014 15:49:07
 
 
General information
Forum:
Microsoft SQL Server
Category:
Database management
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01591061
Message ID:
01591472
Views:
38
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform