Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Heap Fragmentation
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

35 Posts

Posted - 09/05/2013 :  16:03:01  Show Profile  Reply with Quote
Greetings and thank you in advance for your time.

First, it was not my fault or design. I am the lucky one who gets to work with it.

We have a large table with 150M rows. No clustered index. Lots of non-clustered indexes. The table is partitioned on a date column. There are about 150 partitions. Select performance is terrible - big surprise.

I ran a select against sys.dm_db_index_physical_stats where avg_fragmentation_in_percent was greater than 20. Almost every partition was returned so about 150 rows. The avg_fragmentation_in_percent is between 30 and 99 percent. Average of about 95% fragmented. Page counts average about 40K per partition.

I understand the issue with re-org or re-build of indexes on a table to reduce the fragmentation of the indexes. Since this is a heap, there is no index that I can target to rebuild.

How would I go about reducing the avg_fragmentation_in_percent for each of the partition heaps?

Thanks for your consideration!

Almighty SQL Goddess

38200 Posts

Posted - 09/05/2013 :  20:03:22  Show Profile  Visit tkizer's Homepage  Reply with Quote
Reorging and rebuilding indexes to fix fragmentation does not generally help with performance. I would suspect missing indexes, out-of-date statistics, poorly written code, hardware bottleneck or other things before even bothering with fragmentation.

What does the execution plans show for the select queries that are performing poorly.

Can a clustered index be added? How wide of a table is it?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server

Subscribe to my blog
Go to Top of Page
  Previous Topic Topic Next 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.04 seconds. Powered By: Snitz Forums 2000