diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml
index 4f78e0e1c0..c72e69bb67 100644
--- a/doc/src/sgml/ref/pgupgrade.sgml
+++ b/doc/src/sgml/ref/pgupgrade.sgml
@@ -784,6 +784,14 @@ psql --username=postgres --file=script.sql postgres
      of the upgrade.  You might need to set connection parameters to
      match your new cluster.
     </para>
+
+    <para>
+     Using <command>vacuumdb --all --analyze-only</command> can efficiently
+     generate such statistics, and the use of <option>--jobs</option>
+     can speed it up.  Option <option>--analyze-in-stages</option> can
+     be used to generate minimal statistics quickly.  Non-zero values of
+     <varname>vacuum_cost_delay</varname> will delay statistics generation.
+    </para>
    </step>
 
    <step>
