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

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

SQLJames
Starting Member

29 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!

tkizer
Almighty SQL Goddess

USA
36582 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
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
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.06 seconds. Powered By: Snitz Forums 2000