Re: [JDBC] Prepared statement performance...
Jochem van Dieten <jochemd@oli.tudelft.nl>
From: Jochem van Dieten <jochemd@oli.tudelft.nl>
To: Barry Lind <barry@xythos.com>
Cc: pgsql-general@postgresql.org, pgsql-jdbc@postgresql.org
Date: 2002-09-27T11:50:18Z
Lists: 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