SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Rebuild Indexes not improving fragmentation
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

5 Posts

Posted - 03/24/2014 :  00:32:56  Show Profile  Reply with Quote
I am trying to reduce index fragmentation to below 30%. So I rebuild all indexes. It took 3 hrs and completed successfully.

There are 29 indexes which still have avg fragmentation above 30%. Some more than 90%.

How can I defragment these indexes? How come they are still fragmented after rebuild?

Flowing Fount of Yak Knowledge

United Kingdom
2139 Posts

Posted - 03/24/2014 :  02:45:32  Show Profile  Visit jackv's Homepage  Reply with Quote
Could you post the commands you used?
It can sometimes happen fragmentation stays high , if there aren't enough rows.
To view the fragmentation levels use this script - http://www.sqlserver-dba.com/2012/01/sql-index-fragmentation-and-sysdm_db_index_physical_stats.html

Jack Vamvas
Go to Top of Page

Almighty SQL Goddess

38073 Posts

Posted - 03/24/2014 :  12:52:32  Show Profile  Visit tkizer's Homepage  Reply with Quote
How big are the tables that show this "issue"? If it's under a certain amount of pages, they cannot be defragmented. I believe scripts often will ignore indexes with less than 10,000 pages in them.

Tara Kizer
SQL Server MVP since 2007
Go to Top of Page

Starting Member

5 Posts

Posted - 03/25/2014 :  02:22:29  Show Profile  Reply with Quote
Thanks for pushing me in right direction. The only fragmented tables are the ones having no primary key (can't believe it) or small setup tables. Its making sense now. I should be able to decide the primary keys and hopefully it should resolve my issue. Thanks a ton.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000