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
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 rebuild indexes

Author  Topic 

Temha
Starting Member

1 Post

Posted - 2007-09-11 : 18:05:23
In the maintance plans there is a Rebuild Index choice.
If u choose tables and views the plan executes
ALTER INDEX <index> ON <table> ;REBUILD
for all indexes in the datebase.
I am currently using this plan on our production DB, scheduled for every Saturday night.
I wonder if there is a downside of using maintance plans. Because it seems to be doing the job. Any comments?

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-09-11 : 23:31:13
It does same work as sql script, the difference is you can specify rebuild which index on which table or view in the script.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-09-12 : 02:04:08
We only rebuild indexes that are fragmented, and we use a different strategy for Small and Large indexes.

We also increase the frequency of Tlog backups whilst the Index rebuilds are running, to try to prevent the Tlog getting extended.

Some places I know alternate which tables are rebuilt on which days, because it takes too long to do them all on one night.

That sort of level of control is a bit difficult using Maintenance Plans, but other than that "the Maintenance Plans do the job", as you said.

"scheduled for every Saturday night"

If you have slack time every night then I would do them daily - otherwise the database is going "out of shape" during the week, whereas updating them nightly would mean that it only goes out of shape for a single day.

Only real downside (IF you have the slack time overnight) is that it will increase the size of TLog backups

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-09-12 : 12:55:33
The maintenance plan isn't very smart. It just runs it for every index, which is not a good idea.

http://weblogs.sqlteam.com/tarad/archive/2007/04/17/60176.aspx

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -