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

Fragmented pages in tables not changing Expand / Collapse
Author
Message
Posted Thursday, June 13, 2013 12:24 PM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 16, 2014 8:22 AM
Points: 165, Visits: 496
I have several tables in a database that shows a high percentage in fragmentation. I created a maintenance plan and runs succesfully however, the fragmentation is not changing.

For example the table below has a 52% fragmentation and pagecount of 109,208 but the rebuild index task doesn't change it.

objectname objectid indexid partitionnum frag pagecount
pricevalue 832955731 1 1 52.0331600907694 109288


I'm just wondering if there's anything I need to do or that I'm doing wrong.

Thank you.
Post #1463250
Posted Thursday, June 13, 2013 2:43 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 10:30 AM
Points: 322, Visits: 983
What are the contents of your maintenance plan?
Does it rebuild indexes base on a fragmentation threshold.

In general I would recommend Ola Hallengren's Index and Statistics maintenance script.
It is widely considered the gold standard.

http://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html
Post #1463316
Posted Thursday, June 13, 2013 2:54 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 5:38 PM
Points: 31,368, Visits: 15,834
Do you have lots of free space in your databases?

In terms of the object, what's the way that it's structured? Is the row size significant compare to page size? Fill factor? it's possible that you can't do much to change the fragmentation, I'd doubt it, but that could be the case.

Can you give the DDL and commands you are running.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1463321
Posted Thursday, June 13, 2013 3:08 PM


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 @ 8:36 AM
Points: 40,615, Visits: 37,080
Got a shrink operation running, automatic or manual?


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 #1463324
Posted Thursday, June 13, 2013 3:53 PM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 16, 2014 8:22 AM
Points: 165, Visits: 496
---What are the contents of your maintenance plan? Does it rebuild indexes base on a fragmentation threshold.

I'm using the default setting for the rebuild index task which generates the script below:

USE [TestDB]
GO
ALTER INDEX [pk_index] ON [dbo].[tablename] REBUILD PARTITION = ALL WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, ONLINE = OFF, SORT_IN_TEMPDB = OFF )


----Do you have lots of free space in your databases? In terms of the object, what's the way that it's structured? Is the row size significant compare to page size? Fill factor? Can you give the DDL and commands you are running.

The database is about 1.9 GB and it has about 25% free space of the mdf file. I think the row count is significatly bigger thatn the page count. The fill factor is the default.

objectname objectid indexid partitionnum frag pagecount RowCount
pricevalue 832955731 1 1 52.0331600907694 109288 3977981



--Got a shrink operation running, automatic or manual?
No I don't have a shrink operation running.

Thank you for all your replies. I'll be reviewing http://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html to hopefully find out more and learn more about rebuilding indexing.
Post #1463336
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse