Database Reference
In-Depth Information
s.avg_record_size_in_bytes,
s.index_id
FROM sys.dm_db_index_physical_stats(DB_ID('AdventureWorks2012'),
OBJECT_ID(N'HumanResources.Employee'),
NULL, NULL, 'Sampled') AS s
WHERE s.record_count > 0
ORDER BY s.index_id;
Figure 25-4 shows the output of this query.
Figure 25-4. The index fragmentation of the HumanResources.Employee table
If you run the same query for the other four tables (in order Purchasing.PurchaseOrderHeader ,
Purchasing.PurchaseOrderDetail , Production.Product , and Person.Person ), the output will look like Figure 25-5 .
Figure 25-5. The index fragmentation for the four tables in the problem query
 
Search WWH ::




Custom Search