Re: Having query cache in core - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Having query cache in core
Date
Msg-id CA+TgmoY6hXx_-F4VJr18fb6J8yH=0TZpWbNaLvCg-pLV1_BPvA@mail.gmail.com
Whole thread Raw
In response to Re: Having query cache in core  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses RE: Having query cache in core  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
List pgsql-hackers
On Mon, May 7, 2018 at 2:32 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> For interactive application only for one subset of queries the plan cache is
> interesting.
>
> @1 There are long queries - the planning time is not significant (although
> can be high), and then plan cache is not important
> @2 there are fast queries with fast planning time - usually we don't need
> plan cache too
> @3 there are fast queries with long planning time - and then plan cache is
> very interesting - can be difficult to separate this case from @1.

That's not my experience.  I agree that plan caching isn't important
for long-running queries, but I think it *is* potentially important
for fast queries with fast planning time.  Even when the planning time
is fast, it can be a significant percentage of the execution time.
Not long ago, we had a case at EDB where a customer was getting custom
plans instead of generic plans and that resulted in a significant
reduction in TPS.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: Built-in connection pooling
Next
From: Peter Eisentraut
Date:
Subject: Re: perlcritic and perltidy