Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

Can I remove Index level 1 and 2 fragmentation?

$
0
0

SELECT avg_page_space_used_in_percent
,avg_fragmentation_in_percent
,index_level
,record_count
,page_count
,fragment_count
,avg_record_size_in_bytes
FROM sys.dm_db_index_physical_stats(DB_ID('Dbname'),OBJECT_ID('Tablename'),NULL,NULL,'DETAILED')
GO

On running above query the result comes in Index level(0,1,2,3) format.

I can see index level 1 and 2 shows maximum fragmentation and index level 0 shows 48 % fragmentation.

Can I remove Index level 1 and 2 fragmentation?


Thanks


Viewing all articles
Browse latest Browse all 15889

Trending Articles