From c92c3d50d7fbe7391b5fc864b444346b2db29ffe Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 14 Apr 2014 23:15:05 -0400 Subject: vacuumdb: Add option --analyze-in-stages Add vacuumdb option --analyze-in-stages which runs ANALYZE three times with different configuration settings, adopting the logic from the analyze_new_cluster.sh script that pg_upgrade generates. That way, users of pg_dump/pg_restore can also use that functionality. Change pg_upgrade to create the script so that it calls vacuumdb instead of implementing the logic itself. --- doc/src/sgml/ref/vacuumdb.sgml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/vacuumdb.sgml b/doc/src/sgml/ref/vacuumdb.sgml index 1c519f5944f..3ecd9999812 100644 --- a/doc/src/sgml/ref/vacuumdb.sgml +++ b/doc/src/sgml/ref/vacuumdb.sgml @@ -203,6 +203,26 @@ PostgreSQL documentation + + + + + Only calculate statistics for use by the optimizer (no vacuum), + like . Run several (currently three) + stages of analyze with different configuration settings, to produce + usable statistics faster. + + + + This option is useful to analyze a database that was newly populated + from a restored dump or by pg_upgrade. This option + will try to create some statistics as fast as possible, to make the + database usable, and then produce full statistics in the subsequent + stages. + + + + -- cgit v1.2.3