HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Do we have to run auto update statistics after index rebuild?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
afterupdateautorebuildstatisticsindexhaverun

Problem

I want to rebuild one of my indexes because fragmentation has reached 97 percent.

I want to know if after I rebuild my index, do I have to update the statistics as well? My auto update statistics feature is on.

And is it necessary to do the auto update?

Solution

You should not update statistics after you rebuilt the index as rebuilding it gives you up-to-date statistics. See Does rebuild index update statistics? by Jack Li for more info.

You get updated stats for the specific index you just rebuilt. Other stats for other indexes on the same table (and statistics not associated with an index at all) do not get updated. You may or may not choose to update those stats separately.

Auto-update is recommended, though I would also recommend a scheduled job too as the threshold for when auto-update kicks in can be too high for many systems. I usually have an update stats job run daily or even more frequently, but it depends on the system and its needs.

Context

StackExchange Database Administrators Q#158760, answer score: 5

Revisions (0)

No revisions yet.