PGStatement#setPrepareThreshold - Mailing list pgsql-jdbc

From Csaba Nagy
Subject PGStatement#setPrepareThreshold
Date
Msg-id 1154529173.21451.27.camel@coppola.muc.ecircle.de
Whole thread Raw
Responses Re: PGStatement#setPrepareThreshold  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
Hi all,

Question: will PGStatement.setPrepareThreshold(1) cause server side
prepare to be used already on the first execution, or only after the
second one ?

The problem: I want to force server side prepare at least for some of
the queries on my system, as the query plan is completely bad if the
server knows the parameters when planning (due to null values in IN
list, nothing to be fixed in my application unless I completely rewrite
some parts of it).

I couldn't figure out this from the log files... postgres logs the
queries as <unnamed>, but that doesn't tell me too much.

Is there a way to force server side prepare from the first query ?

Thanks,
Csaba.



pgsql-jdbc by date:

Previous
From: ron
Date:
Subject: Re: Callablestatement's resulting resultset not scrollable
Next
From: Oliver Jowett
Date:
Subject: Re: PGStatement#setPrepareThreshold