You are here: Re: SQL2005 Rebuild Index Not Working « MsSQL Server « IT news, forums, messages
Re: SQL2005 Rebuild Index Not Working

Posted by smithabreddy on 06/09/06 12:52

Have you checked the fillfactor defined for these indexes?

(use sys.indexes to get this information)

wackyphill@yahoo.com wrote:
> After rebuilding an index, it still shows as the same amount of
> fragmentation. ANy ideas what's wrong?
>
> I'm determining which indexes to rebuild using the following query:
>
> SELECT
> OBJECT_NAME(i.object_id) AS TableName,
> i.name AS IndexName,
> ips.avg_fragmentation_in_percent
> FROM sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL,
> 'DETAILED') ips
> JOIN sys.indexes i ON
> i.object_id = ips.object_id
> AND i.index_id = ips.index_id
> WHERE ips.avg_fragmentation_in_percent > 10
>
> (I know 10% is not enough where a full rebuild is called for, just
> wanted to see my fragmentation)
>
> Then I rebuild w/:
>
> ALTER INDEX IX_CustomerName ON Customers REBUILD
>
> When I rerun the 1st query the same amount of fragmentation is shown
> as before the rebuild. I'd appreciate any help.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация