July 31, 2014 at 7:34 am
I have a script where it finds all the indexes where the fragmentation percent is above 30. I would like to create a dynamic query to rebuild those indexes where the frag > 30
any pointers would be gretly appreciated. Thanks
July 31, 2014 at 7:43 am
Have you checked out Ola Hallengren's maintenance solution? This covers defragmenting indexes like what you're after and is very configurable.
Main Site:
Index Maintenance Page:
http://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html
July 31, 2014 at 8:03 am
Use Ola's scripts. No point in redoing all the work he's done.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply