pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Rob Northcott <Rob.Northcott@compilator.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Query much slower on 9.6.5 than on 9.3.5
Date: Sun, 7 Apr 2019 08:08:23 -0500
Message-ID: <14dbbf21-b375-e89d-3f50-543f3edd61ac@joeconway.com> (raw)
In-Reply-To: <PR2PR08MB4874A51974DAC4FA9AFEBED39B510@PR2PR08MB4874.eurprd08.prod.outlook.com>
References: <PR2PR08MB48749A44649B6EDAB691F00F9B510@PR2PR08MB4874.eurprd08.prod.outlook.com>
	<b3dea062-cf48-11a7-bcac-a74566985e32@gmail.com>
	<PR2PR08MB487426FD1307454B15DD47C69B510@PR2PR08MB4874.eurprd08.prod.outlook.com>
	<83564721-f491-66fa-9752-bfcd5d5b7176@gmail.com>
	<PR2PR08MB4874A51974DAC4FA9AFEBED39B510@PR2PR08MB4874.eurprd08.prod.outlook.com>

On 4/5/19 6:23 AM, Rob Northcott wrote:
> Ah, fair enough – I’ll get into the habit of doing that then.  Thanks again.
> 
> Rob

> *From:*Ron <ronljohnsonjr@gmail.com>
> *Sent:* 05 April 2019 11:07
> *To:* pgsql-general@lists.postgresql.org
> *Subject:* Re: Query much slower on 9.6.5 than on 9.3.5
> 
> pg_dump/restore gets rid of all the dead space, and you should *always*
> run an ANALYZE after pg_restore, since pg_restore doesn't populate the
> statistics tables.

After the dump/restore cycle I would recommend a "VACUUM FREEZE ANALYZE"
if you can tolerate the time it takes, as this will not only ensure that
the statistics are populated, but it will also get future rewrites of
the rows out of the way all at once (visibility hint bits and freezing
of the tuples).

Joe
-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development





view thread (6+ messages)

Message-ID: <14dbbf21-b375-e89d-3f50-543f3edd61ac@joeconway.com>
Permalink:  ../14dbbf21-b375-e89d-3f50-543f3edd61ac@joeconway.com/
Also on:    postgresql.org/message-id/14dbbf21-b375-e89d-3f50-543f3edd61ac@joeconway.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: mail@joeconway.com, Rob.Northcott@compilator.com
  Subject: Re: Query much slower on 9.6.5 than on 9.3.5
  In-Reply-To: <14dbbf21-b375-e89d-3f50-543f3edd61ac@joeconway.com>
  References: <PR2PR08MB48749A44649B6EDAB691F00F9B510@PR2PR08MB4874.eurprd08.prod.outlook.com> <b3dea062-cf48-11a7-bcac-a74566985e32@gmail.com> <PR2PR08MB487426FD1307454B15DD47C69B510@PR2PR08MB4874.eurprd08.prod.outlook.com> <83564721-f491-66fa-9752-bfcd5d5b7176@gmail.com> <PR2PR08MB4874A51974DAC4FA9AFEBED39B510@PR2PR08MB4874.eurprd08.prod.outlook.com> <14dbbf21-b375-e89d-3f50-543f3edd61ac@joeconway.com>

* 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