Re: does max_connections affect the query planner

Bob Jolliffe <[email protected]>
Newsgroups gmane.comp.db.postgresql.performance
Message-ID <CACd=f9cWs6auC+aqkSAY6w8m4MXEoE=UPwCUF8f7Z0FY_Kg-Tg@mail.gmail.com>
Thanks Tom.  Will check that.

On Tue, 17 Sep 2019 at 14:13, Tom Lane <[email protected]> wrote:
>
> Bob Jolliffe <[email protected]> writes:
> > We do know that max_connections is set quite high (600) when we don't
> > really expect more than 100.  I wonder does the planner take
> > max_connections x work_mem into account when considering the memory it
> > has potentially available?
>
> No.  There have been discussions to the effect that it ought to have
> a more holistic view about available memory; but nothing's been done
> about that, and certainly no existing release does so.
>
> Usually the proximate cause of bad plan choices is bad rowcount
> estimates --- you can spot that by comparing estimated and actual
> rowcounts in EXPLAIN ANALYZE results.
>
>                         regards, tom lane
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.