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.
Author |
Topic |
jacksja
Starting Member
4 Posts |
Posted - 2010-04-22 : 13:13:32
|
Hi everyone,I need some guidance on the best practices for creating maintenance plans that will help in optimizing and tuning the database.I am creating database backups using the maintenance plans tasks drag and drop icons.The order of my user backup maintenance plan is setup as follows:1. Backup database task2. Rebuild Index task3. Update Statistics task4. Shrink Database taskI'm not sure if I'm setting up the above steps in the correct order. is there any documentation regarding the order in which these tasks should be performed? Any advice given will be greatly appreciatedRegards,James |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
jacksja
Starting Member
4 Posts |
Posted - 2010-04-22 : 14:57:59
|
Tara,I greatly appreciate your response. Thank you very much.-James |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
jeffw8713
Aged Yak Warrior
819 Posts |
Posted - 2010-04-24 : 21:23:40
|
One thing you should be aware of - when you rebuild your indexes, the statistics are updated. If you reorganize the index the statistics will not be updated. Instead of relying on the maintenance plan update statistics task, which by default updates all statistics you can use an Execute SQL Task and execute the following:Use YourDatabase; Execute sp_updatestats @resample = 'RESAMPLE';The procedure sp_updatestats has logic that will only update statistics that need to be updated. Using the resample option tells the procedure to use the previous sampling rate that was used to create the statistics instead of the default sampling rate. |
 |
|
|
|
|