Re: AWS forcing PG upgrade from v9.6 a disaster - Mailing list pgsql-general

From Michael Lewis
Subject Re: AWS forcing PG upgrade from v9.6 a disaster
Date
Msg-id CAHOFxGpJx6=W0ADLr9UFjSdPDF4OyOzm2mwhXWQkKB9N5MQ8zA@mail.gmail.com
Whole thread Raw
In response to Re: AWS forcing PG upgrade from v9.6 a disaster  (Lionel Bouton <lionel.bouton@jtek.fr>)
List pgsql-general


On Sat, May 29, 2021, 4:40 AM Lionel Bouton <lionel.bouton@jtek.fr> wrote:
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.

It also increases planning time since those distribution statistics need to be consumed and decisions have to be made.

pgsql-general by date:

Previous
From: Laura Smith
Date:
Subject: Re: Overriding natural order of query results for a subset
Next
From: Vijaykumar Jain
Date:
Subject: max_connections