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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Stuck Indexes?

Author  Topic 

jeffdavid
Starting Member

8 Posts

Posted - 2008-06-30 : 13:28:45
This is a follow up on an older thread. I've created a maintenance plan to rebuild indexes on our user tables. I did this because the majority of indexes were heavily fragmented in the 70 - 90 percentile. The plan ran successfully and reanalyzing the indexes it appears to remove the fragmentation on about 95% of the indexes. There are still a few indexes that are heavily fragmented though. I tried to rebuild them manually using the ALTER INDEX command, but it appears to do nothing. Any suggestions? Thanks!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-30 : 13:34:59
You can't fix fragmentation on indexes where there aren't too many pages. This is typically the case on tables with just a few thousand rows. So any rebuild maintenance plan should include an option to ignore these.

See mine: http://weblogs.sqlteam.com/tarad/archive/2007/11/27/60415.aspx

An upcoming version of mine will include the option for pages, but I'll keep the rowcount option in there for backward compatibility.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-30 : 15:04:14
Just eager to know why fragmentation of index is so high if there are so less pages? What does it?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-30 : 15:11:08
I don't know.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-04 : 21:52:00
Because sql put small table on shared extents.
Go to Top of Page
   

- Advertisement -