PGStatement#setPrepareThreshold

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Postgres JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: PGStatement#setPrepareThreshold
Date: 2006-08-02 14:32:54
Message-ID: 1154529173.21451.27.camel@coppola.muc.ecircle.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2006-08-03 06:05:09 Re: PGStatement#setPrepareThreshold
Previous Message ron 2006-08-02 04:05:45 Re: Callablestatement's resulting resultset not scrollable