From 29c18bca5021e09b8d9d99e6ff5e0ed27cc96f61 Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Tue, 18 Mar 2003 00:02:11 +0000
Subject: [PATCH] Add mention of ANALYZE after object restore.

---
 doc/src/sgml/backup.sgml         |  9 ++++++++-
 doc/src/sgml/ref/pg_dump.sgml    | 13 ++++++++++++-
 doc/src/sgml/ref/pg_dumpall.sgml | 13 ++++++++++---
 doc/src/sgml/ref/pg_restore.sgml |  8 +++++++-
 4 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 327990e5584..a58945f1ef0 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.24 2002/11/11 20:14:02 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.25 2003/03/18 00:02:11 momjian Exp $
 -->
 <chapter id="backup">
  <title>Backup and Restore</title>
@@ -125,6 +125,13 @@ psql <replaceable class="parameter">dbname</replaceable> &lt; <replaceable class
     authentication settings.
    </para>
 
+   <para>
+    Once restored, it is wise to run <command>ANALYZE</> on each
+    database so the optimizer has useful statistics. You
+    can also run <command>vacuumdb -a -z</> to <command>ANALYZE</> all
+    databases.
+   </para>
+
    <para>
     The ability of <application>pg_dump</> and <application>psql</> to
     write to or read from pipes makes it possible to dump a database
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index d8ae789fbe2..3b35c0da698 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.56 2003/02/13 04:54:15 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.57 2003/03/18 00:02:11 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -650,6 +650,11 @@ CREATE DATABASE foo WITH TEMPLATE template0;
 </programlisting>
   </para>
 
+   <para>
+    Once restored, it is wise to run <command>ANALYZE</> on each
+    restored object so the optimizer has useful statistics.
+   </para>
+
   <para>
    <application>pg_dump</application> has a few limitations:
 
@@ -682,6 +687,12 @@ CREATE DATABASE foo WITH TEMPLATE template0;
    other output formats is not limited, except possibly by the
    operating system.
   </para>
+
+  <para>
+   Once restored, it is wise to run <command>ANALYZE</> on each
+   restored object so the optimizer has useful statistics.
+  </para>
+
  </refsect1>
 
  <refsect1 id="pg-dump-examples">
diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml
index 64cea1f4a63..b584bb447ab 100644
--- a/doc/src/sgml/ref/pg_dumpall.sgml
+++ b/doc/src/sgml/ref/pg_dumpall.sgml
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.36 2003/01/06 18:53:24 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.37 2003/03/18 00:02:11 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -258,10 +258,17 @@ PostgreSQL documentation
    <application>pg_dumpall</application> will need to connect several
    times to the <productname>PostgreSQL</productname> server.  If password
    authentication is configured, it will ask for a password each time. In
-   that case it would be convenient to set up a password file.
+   that case it would be convenient to set up a <filename>.pgpass</> 
+   password file.
+  </para>
+
+  <para>
+   Once restored, it is wise to run <command>ANALYZE</> on each
+   database so the optimizer has useful statistics. You
+   can also run <command>vacuumdb -a -z</> to <command>ANALYZE</> all
+   databases.
   </para>
 
-  <comment>But where is that password file documented?</comment>
  </refsect1>
 
 
diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml
index be76f55a36c..427cbd45514 100644
--- a/doc/src/sgml/ref/pg_restore.sgml
+++ b/doc/src/sgml/ref/pg_restore.sgml
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.35 2003/01/19 00:13:31 momjian Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.36 2003/03/18 00:02:11 momjian Exp $ -->
 
 <refentry id="APP-PGRESTORE">
  <docinfo>
@@ -589,6 +589,12 @@ CREATE DATABASE foo WITH TEMPLATE = template0;
    See also the <xref linkend="app-pgdump"> documentation for details on
    limitations of <application>pg_dump</application>.
   </para>
+
+  <para>
+   Once restored, it is wise to run <command>ANALYZE</> on each
+   restored object so the optimizer has useful statistics.
+  </para>
+
  </refsect1>
 
 
-- 
GitLab