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: Thu, 27 Feb 2003 15:12:36 -0500
- Message-id: <27615(dot)1046376756(at)sss(dot)pgh(dot)pa(dot)us>
mlw <pgsql(at)mohawksoft(dot)com> writes:
> From an "ease of use" perspective, it would be one less step.
There is something to be said for that. As Rod notes, this has been
considered and rejected before --- but I think that was back when
ANALYZE (a) could only be done as part of VACUUM, and (b) insisted on
scanning the whole table. The current implementation is vastly
lighter-weight than what we were looking at back then. Perhaps it's
time to reconsider.
Although I suggested doing a single unconditional ANALYZE at the end
of the script, second thought leads me to think the per-table ANALYZE
(probably issued right after the table's data-load step) might be
better. That way you'd not have any side-effects on already-existing
tables in the database you are loading to. OTOH, that way would leave
the system catalogs un-analyzed, which might be bad.
regards, tom lane
Home |
Main Index |
Thread Index