The sentence in question gave readers the impression that vacuumdb
removes statistics for a period of time while analyzing, but it's
actually meant to convey that --analyze-in-stages temporarily
replaces existing statistics with ones generated with lower
statistics targets.
Reported-by: Frédéric Yhuel <frederic.yhuel@dalibo.com>
Reviewed-by: Frédéric Yhuel <frederic.yhuel@dalibo.com>
Reviewed-by: "David G. Johnston" <david.g.johnston@gmail.com>
Reviewed-by: Corey Huinker <corey.huinker@gmail.com>
Reviewed-by: Jeff Davis <pgsql@j-davis.com>
Discussion: https://postgr.es/m/
4b94ca16-7a6d-4581-b2aa-
4ea79dbc082a%40dalibo.com
Backpatch-through: 18
<listitem>
<para>
Only analyze relations that are missing statistics for a column, index
- expression, or extended statistics object. This option prevents
- <application>vacuumdb</application> from deleting existing statistics
- so that the query optimizer's choices do not become transiently worse.
+ expression, or extended statistics object. When used with
+ <option>--analyze-in-stages</option>, this option prevents
+ <application>vacuumdb</application> from temporarily replacing existing
+ statistics with ones generated with lower statistics targets, thus
+ avoiding transiently worse query optimizer choices.
</para>
<para>
This option can only be used in conjunction with