diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml
index 4f78e0e1c0b..2520f6c50dd 100644
--- a/doc/src/sgml/ref/pgupgrade.sgml
+++ b/doc/src/sgml/ref/pgupgrade.sgml
@@ -784,6 +784,17 @@ psql --username=postgres --file=script.sql postgres
of the upgrade. You might need to set connection parameters to
match your new cluster.
+
+
+ Using vacuumdb --all --analyze-only can efficiently
+ generate such statistics, and the use of
+ can speed it up. Option
+ can be used to generate minimal statistics quickly.
+ If vacuum_cost_delay is set to a non-zero
+ value, this can be overridden to speed up statistics generation
+ using PGOPTIONS, e.g., PGOPTIONS='-c
+ vacuum_cost_delay=0' vacuumdb ....
+