|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 2:43 AM
Points: 1,564,
Visits: 1,488
|
|
Hi, I have created a non-unique, non cluster index in one of the table. But when I run the query in my database select * from sys.dm_db_index_physical_stats(db_id('Inventory'),null,null,null,null)
I can see that there is avg_fragmentation_in_percent of 75 for the newly created index. Ideally it should not have any fragmentation. Even after rebuilding and reorganizing the index also, the fragmentation is not getting reduced. It is showing the same.
Can anyone please explain me the reason?
Ryan //All our dreams can come true, if we have the courage to pursue them//
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 7:42 AM
Points: 2,802,
Visits: 7,103
|
|
| how many rows are in the table?
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 12:59 PM
Points: 37,640,
Visits: 29,895
|
|
How big's the table? How many pages?
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
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 4:17 AM
Points: 1,123,
Visits: 4,422
|
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 12:59 PM
Points: 37,640,
Visits: 29,895
|
|
muthukkumaran (2/16/2010) Object have cluster index ?
It's not required that a table have a clustered index in order to defragment a nonclustered index.
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
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 4:17 AM
Points: 1,123,
Visits: 4,422
|
|
GilaMonster (2/16/2010)
muthukkumaran (2/16/2010) Object have cluster index ?It's not required that a table have a clustered index in order to defragment a nonclustered index.
Yes I agreed Gail.
The OP create a Non clustered index,so i guess the table was Heap.
Muthukkumaran Kaliyamoorthy
Helping SQL DBAs and Developers >>>SqlserverBlogForum
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 12:59 PM
Points: 37,640,
Visits: 29,895
|
|
muthukkumaran (2/16/2010) The OP create a Non clustered index,so i guess the table was Heap.
How do you conclude that?
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
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 4:17 AM
Points: 1,123,
Visits: 4,422
|
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 2:43 AM
Points: 1,564,
Visits: 1,488
|
|
Hi All , sorry for the late reply. Actually the table is very small it has only 399 rows and size is 234MB. Previously it was a heap table. Just for testing purpose I created a non-unique, non-clustered index on that table.
Ryan //All our dreams can come true, if we have the courage to pursue them//
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 7:42 AM
Points: 2,802,
Visits: 7,103
|
|
You shouldn't worry about fragmentation on a table with that few rows.
MS recomends that you should not be concerned with fragementation of indexes with less than 1000 pages
|
|
|
|