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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Index Help
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

224 Posts

Posted - 10/02/2012 :  11:45:36  Show Profile  Reply with Quote
I am trying to Rebuild and Reorganize index on table. Before i Rebuild/Re Organize Total Fragmentation is 66.67%, but after i Rebuild/Re Organize the Percentage doesn't change ( Total Fragmentation is 66.67%). Is any one can help me or guide me why he doesn't change? and anyone have handy script to Rebuild/Re Organize and update statistics on whole table.

2) Other question its a good idea if i run (Rebuild/Re organize index and Update Statistics on Database) every 30minutes or every day?

Thank You.

Constraint Violating Yak Guru

343 Posts

Posted - 10/02/2012 :  12:05:52  Show Profile  Reply with Quote
It's a good idea to base reorganize / rebuild operations on fragmentation level. In a 24/7/365 applications, you won't want to run this every 30 minutes as rebuilds can introduce blocking depending on your edition. Ideally, you'll want to stagger the job over non-peak hours as appropriate for your needs.

A quick search found as a potential script that will intelligently determine if and when you need to update statistics, rebuild or reorganize. I haven't used it before, so I can't vouch for it, but it should get you on the right track.
Go to Top of Page

Most Valuable Yak

15732 Posts

Posted - 10/02/2012 :  12:38:32  Show Profile  Visit robvolk's Homepage  Reply with Quote
I can definitely vouch for and recommend Ola's index script, it works very well and is very easy to use.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000