July 10, 2009 at 9:56 am
Our two production servers get rebooted weekly. Along with restarting SQL Server, do indexes get rebuilt? If not, can it be made part of restart? I'm trying to avoid a weekly update of statistics since we are already restarting the service.
July 10, 2009 at 10:23 am
First I have to ask why are you rebooting weekly? I've even had SQL 7.0 boxes go months without needing a reboot.
As far as I know indexes are not rebuilt nor are statistics updated by a restart of SQL Server. The Cache is flushed though. If you want to rebuild/reorganize indexes at startup then you could create a procedure that does that and mark that as a startup procedure using sp_procoption.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
July 10, 2009 at 10:29 am
You can create some procs that will take care of your reindexing needs. When creating the procs you can set them up as startup procs so they will run when the service is restarted; or you could schedule them to run at a specific time if you know the reboot time to be somewhat constant each week.
My preference would be to defrag the indexes - exclusive of rebooting the servers weekly. And if you defrag indexes weekly, you should update statistics after the defrag is complete.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
July 10, 2009 at 10:44 am
CirquedeSQLeil (7/10/2009)
My preference would be to defrag the indexes - exclusive of rebooting the servers weekly. And if you defrag indexes weekly, you should update statistics after the defrag is complete.
If you REBUILD an index then you do not have to update statistics as SQL Server does that anyway, if you REORGANIZE an index you will probably want to UPDATE statistics as well. Here are a couple of blog posts about index maintenance that might help:
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply