Running --analyze-in-stages on a database with statistics causes the statistics to become significantly worse before they are improved. This could be made clearer in the documentation.
diff --git i/doc/src/sgml/ref/vacuumdb.sgml w/doc/src/sgml/ref/vacuumdb.sgml index 223b986..d76c18e 100644 --- i/doc/src/sgml/ref/vacuumdb.sgml +++ w/doc/src/sgml/ref/vacuumdb.sgml @@ -403,9 +403,10 @@ PostgreSQL documentation </para> <para> - This option is useful to analyze a database that was newly populated + This option is useful to analyze a database that current has no, + or bad, statistics e.g. it was newly populated from a restored dump or by <command>pg_upgrade</command>. This option - will try to create some statistics as fast as possible, to make the + will create coarse statistics as fast as possible, to make the database usable, and then produce full statistics in the subsequent stages. </para>
signature.asc
Description: OpenPGP digital signature