November 16, 2014 at 2:03 pm
I am planning to use Maintenance plan to rebuild index and update statistics.
I know, rebuild indexes also update index statistics not the column. if I run rebuild index first then index statistics will be updated, then won't update statistics try to update index statistic again or it just ignores it because it is up to date?
Bottom line, which should run first Index rebuild or update statistics? Suggest please.
November 16, 2014 at 5:30 pm
smtzac (11/16/2014)
I am planning to use Maintenance plan to rebuild index and update statistics.I know, rebuild indexes also update index statistics not the column. if I run rebuild index first then index statistics will be updated, then won't update statistics try to update index statistic again or it just ignores it because it is up to date?
Bottom line, which should run first Index rebuild or update statistics? Suggest please.
For the very reasons you mention, my bottom line would be to not use Maintenance Plans to do anything of such importance. If you're not inclined to write your own, there are a lot of good scripts out there that take all of this into account.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 17, 2014 at 1:24 am
If you are going to stick with maintenance plans (not the best for index/stats maintenance), then you can select 'column statistics' on the stats update task and only the non-index stats will then be updated.
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
November 17, 2014 at 5:46 am
Thank you guys. One more question: Should update statistics job run first or Index rebuild job? Is it OK to use maintenance plan to run update statistic with column only? or is there any good script out there?
November 17, 2014 at 5:49 am
smtzac (11/17/2014)
One more question: Should update statistics job run first or Index rebuild job?
If you set the stats task to column stats only, it doesn't make the slightest difference which order you run them, as they're doing independent things.
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
November 17, 2014 at 6:11 am
if i select 'All statistics' then should Index job run first and then update statistics? And how often should update statistic on large DB?
November 17, 2014 at 6:16 am
Don't select all statistics if you're rebuilding indexes. It's a waste of time. If you're rebuilding indexes (maint plan rebuilds all), then select 'column statistics' on your stats update job.
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
November 17, 2014 at 8:15 am
Sorry, I still didn't get my answer. Generally which should run first? Rebuild index or Update statistics.
November 17, 2014 at 8:17 am
If you set the stats task to column stats only, it doesn't make the slightest difference which order you run them, as they're doing independent things.
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 9 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply