When I run...
ALTER INDEX ALL ON dbo.[Yadkin Base Form]
REBUILD WITH (FILLFACTOR = 80, SORT_IN_TEMPDB = ON,
STATISTICS_NORECOMPUTE = On);
go
EXEC sp_updatestats
and I look at the Total Fragmentation in the properties of the index it shows 0.00%. But if I run
SELECT D.name AS 'Database', O.name AS 'Table', SP.avg_fragmentation_in_percent
FROM sys.dm_db_index_physical_stats(null, null, null, null, null) SP
join sys.databases D
on SP.database_id = D.database_id
join sys.all_objects O
on SP.object_id = bject_id
where avg_fragmentation_in_percent > 5
order by SP.avg_fragmentation_in_percent desc
then I get
avg_fragmentation_in_percent=98.961937716263
Is there a problem with the query or shouldn't they match up?
Thanks
Simi
ALTER INDEX ALL ON dbo.[Yadkin Base Form]
REBUILD WITH (FILLFACTOR = 80, SORT_IN_TEMPDB = ON,
STATISTICS_NORECOMPUTE = On);
go
EXEC sp_updatestats
and I look at the Total Fragmentation in the properties of the index it shows 0.00%. But if I run
SELECT D.name AS 'Database', O.name AS 'Table', SP.avg_fragmentation_in_percent
FROM sys.dm_db_index_physical_stats(null, null, null, null, null) SP
join sys.databases D
on SP.database_id = D.database_id
join sys.all_objects O
on SP.object_id = bject_id
where avg_fragmentation_in_percent > 5
order by SP.avg_fragmentation_in_percent desc
then I get
avg_fragmentation_in_percent=98.961937716263
Is there a problem with the query or shouldn't they match up?
Thanks
Simi