Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Fragmention even after rebuilding the indexes Expand / Collapse
Author
Message
Posted Monday, February 18, 2013 1:58 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 4:24 AM
Points: 261, Visits: 644
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
Post #1421085
Posted Monday, February 18, 2013 2:04 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 6:49 AM
Points: 5,227, Visits: 5,087
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'





Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1421091
Posted Monday, February 18, 2013 2:11 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Tuesday, August 19, 2014 3:08 AM
Points: 617, Visits: 1,273
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

-- Roshan Joe
*******************************************
Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help
Custom cleanup script for backups
Post #1421099
Posted Monday, February 18, 2013 2:28 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 11:31 AM
Points: 42,844, Visits: 35,973
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 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1421103
Posted Tuesday, February 19, 2013 4:04 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 4:24 AM
Points: 261, Visits: 644
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?
Post #1421527
Posted Tuesday, February 19, 2013 4:07 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 6:49 AM
Points: 5,227, Visits: 5,087
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.




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1421528
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse