Re: Forcing analyze on DB after upgrading? - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: Forcing analyze on DB after upgrading?
Date
Msg-id 6912b4dadb63b3b766d3536b6d27d76840759f35.camel@cybertec.at
Whole thread Raw
In response to Re: Forcing analyze on DB after upgrading?  (Wells Oliver <wells.oliver@gmail.com>)
List pgsql-admin
On Tue, 2019-10-29 at 22:41 -0700, Wells Oliver wrote:
> Thanks! Unfortunately I can't find the shell script it created in /var/log/postgresql -- however,
> I ran vacuumdb --full --verbose --analyze-in-stages and the DB performs much, much better.

Ouch. --full might hurt.

> As I can't seem to find the script, anything else a good thing to do after doing pg_upgrade to prime the DB?

pg_upgrade recommends

   vacuumdb --all --analyze-in-stages

which runs three analyze passes with different "default_statistics_target"
to get up and running as fast as possible, but if you can wait a little,

   vacuumdb --all --analyze-only

will be faster.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-admin by date:

Previous
From: Wells Oliver
Date:
Subject: Re: Forcing analyze on DB after upgrading?
Next
From: Pepe TD Vo
Date:
Subject: commit & rollback