Re: Query much slower on 9.6.5 than on 9.3.5

From: Joe Conway <mail(at)joeconway(dot)com>
To: Rob Northcott <Rob(dot)Northcott(at)compilator(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Query much slower on 9.6.5 than on 9.3.5
Date: 2019-04-07 13:08:23
Message-ID: 14dbbf21-b375-e89d-3f50-543f3edd61ac@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)gmail(dot)com>
> *Sent:* 05 April 2019 11:07
> *To:* pgsql-general(at)lists(dot)postgresql(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lou Tseng 2019-04-07 13:22:50 Logical replication failed recovery
Previous Message hamann.w 2019-04-07 06:42:06 Re: How to use full-text search URL parser to filter query results by domain name?