Re: does max_connections affect the query planner

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bob Jolliffe <bobjolliffe(at)gmail(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: does max_connections affect the query planner
Date: 2019-09-17 14:13:40
Message-ID: 560.1568729620@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Bob Jolliffe <bobjolliffe(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Bob Jolliffe 2019-09-17 14:15:04 Re: does max_connections affect the query planner
Previous Message Bob Jolliffe 2019-09-17 08:40:53 does max_connections affect the query planner