index fragmenation
Get Index Fragmentation Percentage for all Tables in SQL Server Database
Submitted by Ben Hodson on Sun, 10/19/2008 - 15:17
Here is a useful script I've been able to put together from multiple posts online that gets the estimated index fragmentation for all tables in your database where the fragmentation percentage is greater than the where clause. Here's the SQL:
select object_name(itable.object_id) as tablename,
itable.name as IndexName,indexfrag.avg_fragmentation_in_percent

Recent comments
14 hours 5 min ago
1 day 13 hours ago
3 days 14 hours ago
4 days 4 hours ago
4 days 15 hours ago
4 days 20 hours ago
5 days 49 min ago
1 week 21 hours ago
1 week 1 day ago
1 week 4 days ago