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 <jamespang886@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: sql statement not using all primary key values and poor performance
Date: Fri, 23 Feb 2024 12:48:55 +0100
Message-ID: <b35f429c57756a151f5b1bbc73b80f24249d75e7.camel@cybertec.at> (raw)
In-Reply-To: <CAHgTRffjX2fvgzg_ygt6Y2oGH-1S_Q9_iq-x_h8=1UkffFWTqA@mail.gmail.com>
References: <CAHgTRfe6e0KUOXBchzXhA3FG-Pn__OY6g301b_W+Zt3a6Xvhbg@mail.gmail.com>
	<194ab08d4e0392152ed7dfd3fa4a6ea7de6250a6.camel@cybertec.at>
	<CAHgTRffjX2fvgzg_ygt6Y2oGH-1S_Q9_iq-x_h8=1UkffFWTqA@mail.gmail.com>

On Fri, 2024-02-23 at 18:21 +0800, James Pang wrote:
> it's a third-party vendor application, not easy to change their code.

Then the application is broken, and you should make the vendor fix it.

> is it possible to   1) in Postgresql JDBC driver connection, set
> plan_cache_mode=force_custom_plan    or 2) some other parameters can workaround this issue?

You can set "prepareThreshold" to 0 to keep the JDBC driver from using
prepared statements in PostgreSQL.  I am not sure if that is enough to
fix the problem.

Yours,
Laurenz Albe





view thread (5+ messages)

Message-ID: <b35f429c57756a151f5b1bbc73b80f24249d75e7.camel@cybertec.at>
Permalink:  ../b35f429c57756a151f5b1bbc73b80f24249d75e7.camel@cybertec.at/
Also on:    postgresql.org/message-id/b35f429c57756a151f5b1bbc73b80f24249d75e7.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, jamespang886@gmail.com, pgsql-performance@lists.postgresql.org
  Subject: Re: sql statement not using all primary key values and poor performance
  In-Reply-To: <b35f429c57756a151f5b1bbc73b80f24249d75e7.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