pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: James Pang (chaolpan) <chaolpan@cisco.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-performance@lists.postgresql.org <pgsql-performance@lists.postgresql.org>
Subject: Re: thousands of CachedPlan entry per backend
Date: Thu, 01 Jun 2023 14:48:23 +0200
Message-ID: <7bbe7bf1fa86dc075d2b655fdadd08fa99180212.camel@cybertec.at> (raw)
In-Reply-To: <PH0PR11MB51918A490F1EDE83C898DB44D6499@PH0PR11MB5191.namprd11.prod.outlook.com>
References: <PH0PR11MB5191F9F3C8CA35737E6F0A99D6499@PH0PR11MB5191.namprd11.prod.outlook.com>
	<9513916420a6c0a00eb5ecacfba984e2e5a97e0d.camel@cybertec.at>
	<CAFj8pRDsJrJGL+nnKLb+1rM5P8gh_XT_bVmDK71k9VgTv8xfzA@mail.gmail.com>
	<PH0PR11MB51918A490F1EDE83C898DB44D6499@PH0PR11MB5191.namprd11.prod.outlook.com>

On Thu, 2023-06-01 at 08:50 +0000, James Pang (chaolpan) wrote:
> we found thousands of cached plan , since JDBC driver only allow max 256 cached
> prepared statements, how backend cache so many sql plans. If we have one function,
> when application call that function will make backend to cache  every SQL statement
> plan in that function too?   and for table triggers, have similar caching behavior ?

Yes, as long as the functions are written in PL/pgSQL.
It only affects static SQL, that is, nothing that is run with EXECUTE.

Yours,
Laurenz Albe





view thread (9+ messages)  latest in thread

Message-ID: <7bbe7bf1fa86dc075d2b655fdadd08fa99180212.camel@cybertec.at>
Permalink:  ../7bbe7bf1fa86dc075d2b655fdadd08fa99180212.camel@cybertec.at/
Also on:    postgresql.org/message-id/7bbe7bf1fa86dc075d2b655fdadd08fa99180212.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: laurenz.albe@cybertec.at, chaolpan@cisco.com, pavel.stehule@gmail.com, pgsql-performance@lists.postgresql.org
  Subject: Re: thousands of CachedPlan entry per backend
  In-Reply-To: <7bbe7bf1fa86dc075d2b655fdadd08fa99180212.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox