Ok, this seemed to solve it:

> vacuumdb -zv ; reindexdb -v

And we are back to full speed ....

Thanks for pointing out the ANALYZE ...

Ben Duncan - Business Network Solutions, Inc. 336 Elton Road Jackson MS, 39212
"Never attribute to malice, that which can be adequately explained by stupidity"
- Hanlon's Razor


-------- Original Message --------
Subject: Re: Issues on 9.5 to 9.6 Upgrade.
From: Adrian Klaver <adrian.klaver@aklaver.com>
Date: Wed, June 13, 2018 11:45 am
To: bend@linux4ms.net, Postgres General <pgsql-general@postgresql.org>

On 06/13/2018 09:44 AM, bend@linux4ms.net wrote:
> Analyze the DB exactly how?

https://www.postgresql.org/docs/10/static/sql-analyze.html

>
> I did run a reindexdb after migration to no affect.
>
> Yeah the PLANS are a big difference ....
>
> Ben Duncan - Business Network Solutions, Inc. 336 Elton Road Jackson MS,
> 39212
> "Never attribute to malice, that which can be adequately explained by
> stupidity"
> - Hanlon's Razor
>
>
> -------- Original Message --------
> Subject: Re: Issues on 9.5 to 9.6 Upgrade.
> From: Don Seiler <don@seiler.us ><mailto:don@seiler.us>>
> Date: Wed, June 13, 2018 11:24 am
> To: bend@linux4ms.net <mailto:bend@linux4ms.net>
> Cc: Postgres General <pgsql-general@postgresql.org
> <mailto:pgsql-general@postgresql.org>>
>
> On Wed, Jun 13, 2018 at 11:16 AM, <bend@linux4ms.net
> <mailto:bend@linux4ms.net>> wrote:
>
>
> Can anyoen explain WHY there is such a big difference? Is it the
> SQL statement or a bug in the pgdump ?
>
>
> Did you analyze the database after upgrading? Or at least the tables
> in question? Those are very different plans.
>
> --
> Don Seiler
> www.seiler.us <http://www.seiler.us>
>


--
Adrian Klaver
adrian.klaver@aklaver.com