Re: [JDBC] Prepared statement performance... - Mailing list pgsql-general

From Jochem van Dieten
Subject Re: [JDBC] Prepared statement performance...
Date
Msg-id 3D9445FA.3050203@oli.tudelft.nl
Whole thread Raw
In response to Prepared statement performance...  (Dmitry Tkach <dmitry@openratings.com>)
List pgsql-general
Barry Lind wrote:
>
> Your first option is what has been implemented.  In 7.3 the server now
> supports 'prepare <name> as <sql>' and 'execute <name>' (and variants
> for passing bind variables).  The jdbc driver also now has a method on
> org.postgresql.PGStatement.setUseServerPrepare(true) to enable the the
> use of server side prepared statements (so you can cast your Statement
> object to an org.postgresql.PGStatement object and enable the
> functionality for a specific statement).
[..]
> It is for the reasons above that the developer needs to explicitly turn
> on the use of server side prepared statements when it makes sense to do so.

How would the developer do that? With the front-end I am working with
(ColdFusion MX) I have very little control over the actual calls to the
driver. I can make CF MX use createStatement() or prepareStatement() but
that is all the control I have. And the only way to send parameters to
the driver would be through a JDBC URL.
Would that enable me to use prepared statements for real or not?

Jochem


pgsql-general by date:

Previous
From: Andriy Tkachuk
Date:
Subject: Re: query speed depends on lifetime of frozen db?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: query speed depends on lifetime of frozen db?