2 messages in com.mysql.lists.javaRe: Prepared Statement Usage
FromSent OnAttachments
tnabe05 Feb 2005 21:10 
Kevin A. Burton06 Feb 2005 04:20 
Subject:Re: Prepared Statement Usage
From:Kevin A. Burton (bur@newsmonster.org)
Date:02/06/2005 04:20:00 AM
List:com.mysql.lists.java

tnabe wrote:

Hello,

I have used prepared statements almost exclusively when invoking JDBC calls
(because of the putative performance advantages).

But I've spent some time perusing the code (3.1.6) and this forum and I'm
wondering whether I've been using them correctly.

It looks like any PreparedStatement instance (created via
connection.prepareStatement("SQL . . .")) is only "re-usable" on the "same"
connection instance, and in fact is only re-usable by client code maintaining a
reference to the original PreparedStatement instance. Is this correct?

Read the documentation for the JDBC connection URL:

http://dev.mysql.com/doc/connector/j/en/cj-driver-classname.html

Specifically cachePrepStmts

... Kevin

--

Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat.

Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html

If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod!