February 18, 2013 at 1:58 am
I Checked for fragmentation on my DEV Server and it was in the late 90's. So i decided i would rebuild the indexes.
I rebuild all the indexes. One day after i did that i again happen to check the level of fragmentation on my DEV Server and to my surprise in one day the level of fragmentation had reach again to the 90's. I don't know the reason for this behaviour but would like to know from you expert
February 18, 2013 at 2:04 am
whats the output of this query in the DB in question?
select
*
from
sys.dm_db_index_physical_stats (DB_ID(),null,null,null,null)
where
page_count > 1000
and
index_type_desc <> 'heap'
February 18, 2013 at 2:11 am
If they are small tables, you can ignore them. If they are bigger ones see how frequent these tables are updated. You can also try changeing the fill factor to slow down fragmentation between your index optimization schedules
February 18, 2013 at 2:28 am
Possibility 1: They're tiny tables or heaps. Small tables you don't need to worry about, heaps need a different command to rebuild (and besides, fragmentation means a different thing for heaps as opposed to indexes)
Possibility 2: You have a manual or automatic shrink running after the index rebuild.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
February 19, 2013 at 4:04 am
anthony.green (2/18/2013)
whats the output of this query in the DB in question?
select
*
from
sys.dm_db_index_physical_stats (DB_ID(),null,null,null,null)
where
page_count > 1000
and
index_type_desc <> 'heap'
The output of the above query shows indexes. The maximum amount of fragmentation return by the above query is not more than 35, could you please tell me what does that mean?
February 19, 2013 at 4:07 am
A index with a page count < 1000 you can usually ignore as fragmentation wont cause you to much of a headache with small tables.
Heaps require a different command to rebuild them.
So if your fragmentation on the indexes returned by that query is no greater than 35 then you can rebuild reorg to sort it out again.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply