Re: AWS forcing PG upgrade from v9.6 a disaster

From: "Dean Gibson (DB Administrator)" <postgresql(at)mailpen(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: AWS forcing PG upgrade from v9.6 a disaster
Date: 2021-05-29 22:47:39
Message-ID: a7a3e931-0267-23bb-4af7-f54a85d3e12e@mailpen.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

I tried 500, to no avail.  Since each change involves a delay as RDS
readjusts, I'm going down a different path at the moment.

On 2021-05-29 03:40, Lionel Bouton wrote:
> Le 29/05/2021 à 02:38, Dean Gibson (DB Administrator) a écrit :
>> The original VACUUM FULL ANALYZE ran in 10 hours.  The plain ANALYZE
>> ran in 88 seconds.
>
> One possibility is that your data has a distribution that defeats the
> ANALYZE sampling strategy.
>
> If that is the case you can force ANALYZE to do a better job by
> increasing the default_statistics_target value (100 by default) and
> reload the configuration. This will sample more data from your table
> which should help the planner find out what the value distribution
> looks like for a column and why using an index for conditions
> involving it is a better solution.
> The last time I had to use this setting to solve this kind of problem
> I ended with :
>
> default_statistics_target = 500
>
> But obviously the value suited to your case could be different (I'd
> increase it until the planner uses the correct index). Note that
> increasing it increases the costs of maintaining statistics (so you
> don't want to increase this by several orders of magnitude blindly)
> but the default value seems fairly conservative to me.
>
> For reference and more fine-tuned settings using per table statistics
> configuration and multi-column statistics for complex situations, see :
> - https://www.postgresql.org/docs/13/runtime-config-query.html
> - https://www.postgresql.org/docs/13/planner-stats.html
>
> --
> Lionel Bouton
> gérant de JTEK SARL
> https://www.linkedin.com/in/lionelbouton/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vijaykumar Jain 2021-05-30 14:49:54 max_connections
Previous Message Michael Lewis 2021-05-29 22:34:57 Re: AWS forcing PG upgrade from v9.6 a disaster

Browse pgsql-performance by date

  From Date Subject
Next Message Dean Gibson (DB Administrator) 2021-05-31 03:07:29 Re: AWS forcing PG upgrade from v9.6 a disaster
Previous Message Michael Lewis 2021-05-29 22:34:57 Re: AWS forcing PG upgrade from v9.6 a disaster