Re: [HACKERS] analyze after a database restore?

2003-03-17 Thread Bruce Momjian
Attached is a committed patch to add a recommendation for ANALYZE after restore. It is a shame we only have vacuumdb -a to do analyze _and_ vacuum, and no analyze-only option. --- Tom Lane wrote: mlw [EMAIL PROTECTED]

Re: [HACKERS] analyze after a database restore?

2003-02-27 Thread Tom Lane
mlw [EMAIL PROTECTED] 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

Re: [HACKERS] analyze after a database restore?

2003-02-27 Thread Rod Taylor
On Thu, 2003-02-27 at 12:27, mlw wrote: I just dumped and restored a rather large database, I upgraded from 7.2.x to 7.3.x. When I went to test my application against the new database, it was dog slow. It had all the indexes, and looked fine. Then it dawned on me, Doh! ANALYZE! Should

Re: [HACKERS] analyze after a database restore?

2003-02-27 Thread mlw
Tom Lane wrote: mlw [EMAIL PROTECTED] 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

Re: [HACKERS] analyze after a database restore?

2003-02-27 Thread Tom Lane
mlw [EMAIL PROTECTED] 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

Re: [HACKERS] analyze after a database restore?

2003-02-27 Thread Andrew Sullivan
On Thu, Feb 27, 2003 at 02:45:46PM -0500, mlw wrote: Are there any reasons why it should not be an option on pg_dump? I wonder whether that mightn't be the best answer. Maybe it should even be the default, and --noanalyse an option. I agree that from the point of view of simplifying

Re: [HACKERS] analyze after a database restore?

2003-02-27 Thread Alvaro Herrera
On Thu, Feb 27, 2003 at 03:12:36PM -0500, Tom Lane wrote: 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

Re: [HACKERS] analyze after a database restore?

2003-02-27 Thread D'Arcy J.M. Cain
On Thursday 27 February 2003 13:12, mlw wrote: Tom Lane wrote: 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?

Re: [HACKERS] analyze after a database restore?

2003-02-27 Thread mlw
D'Arcy J.M. Cain wrote: On Thursday 27 February 2003 13:12, mlw wrote: Tom Lane wrote: 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