pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Murthy Nunna <mnunna@fnal.gov>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: pg_dump -Are statistics saved?
Date: Tue, 28 Nov 2023 07:55:23 +0100
Message-ID: <1bb4707116e574187d2c5c445ddf656663858303.camel@cybertec.at> (raw)
In-Reply-To: <4040678.1701132345@sss.pgh.pa.us>
References: <DM8PR09MB6677154B85D10BF16F8379CBB8BCA@DM8PR09MB6677.namprd09.prod.outlook.com>
	<4040678.1701132345@sss.pgh.pa.us>

On Mon, 2023-11-27 at 19:45 -0500, Tom Lane wrote:
> Murthy Nunna <mnunna@fnal.gov> writes:
> 
> 
> > If not, is it necessary to run ANALYZE after pg_restore?
> 
> That has always been necessary after a dump/restore, and still is.
> The pg_dump man page makes this clear enough, I should think:
> 
>     The dump file produced by pg_dump does not contain the statistics used
>     by the optimizer to make query planning decisions. Therefore, it is
>     wise to run ANALYZE after restoring from a dump file to ensure optimal
>     performance; see Section 25.1.3 and Section 25.1.6 for more
>     information.

If you are not pressed for time, you can wait until autovacuum gets around
to calculating the statistics automatically.

Yours,
Laurenz Albe





view thread (4+ messages)

Message-ID: <1bb4707116e574187d2c5c445ddf656663858303.camel@cybertec.at>
Permalink:  ../1bb4707116e574187d2c5c445ddf656663858303.camel@cybertec.at/
Also on:    postgresql.org/message-id/1bb4707116e574187d2c5c445ddf656663858303.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, tgl@sss.pgh.pa.us, mnunna@fnal.gov
  Subject: Re: pg_dump -Are statistics saved?
  In-Reply-To: <1bb4707116e574187d2c5c445ddf656663858303.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox