Re: analyze after a database restore?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: mlw <pgsql(at)mohawksoft(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: analyze after a database restore?
Date: 2003-02-27 17:55:42
Message-ID: 13176.1046368542@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

mlw <pgsql(at)mohawksoft(dot)com> writes:
> Should pg_dump appened an ANALYZE for each table?

A single ANALYZE at the end of the script would be sufficient. I'm not
sure that pg_dump should do this automatically though. If you're not
done restoring then it's mostly a waste of cycles, and how is pg_dump to
know that?

I do note that the docs are rather stingy with this important bit of
knowhow :-( Neither of the obvious places that I looked in (pg_dump
reference page and admin guide's backup/restore chapter) mention the
need to issue an ANALYZE after completing a restore. I'm pretty sure it
is mentioned *somewhere* ;-) ... but it needs to be more prominent.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2003-02-27 17:55:49 Re: Can pessimistic locking be emulated?
Previous Message Tom Lane 2003-02-27 17:37:54 Re: Can pessimistic locking be emulated?