Re: sql statement not using all primary key values and poor performance - Mailing list pgsql-performance

From Laurenz Albe
Subject Re: sql statement not using all primary key values and poor performance
Date
Msg-id b35f429c57756a151f5b1bbc73b80f24249d75e7.camel@cybertec.at
Whole thread Raw
In response to Re: sql statement not using all primary key values and poor performance  (James Pang <jamespang886@gmail.com>)
List pgsql-performance
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



pgsql-performance by date:

Previous
From: James Pang
Date:
Subject: Re: sql statement not using all primary key values and poor performance
Next
From: James Pang
Date:
Subject: Re: FW: huge SubtransSLRU and SubtransBuffer wait_event