Re: Postgres prepare statement caching issue in postgres command line

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Soumya Prasad Ukil <soumyo_ju(at)yahoo(dot)co(dot)in>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Postgres prepare statement caching issue in postgres command line
Date: 2021-05-22 21:11:21
Message-ID: 283195.1621717881@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Soumya Prasad Ukil <soumyo_ju(at)yahoo(dot)co(dot)in> writes:
> I have been using postgres prepare statement feature through JDBC. I could see the same prepare statement multiple times, parsing is not happening in postgres backend, which is expected. However I do the same in psql command line, that does not happen. It goes to parsing every time I execute

Perhaps "set plan_cache_mode = force_generic_plan" would help you.

Bear in mind that this is likely to be a net loss overall.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2021-05-22 21:53:48 Re: Framework for 0 downtime deploys
Previous Message Magnus Hagander 2021-05-22 20:47:23 Re: Fwd: Proposed Chinese Translation of Community Code of Conduct