Re: The performance problem of server side PreparedStatement?
Posted by: Mark Matthews
Date: December 14, 2004 08:06AM

The JDBC spec doesn't let the driver implicitly cache the creation of a prepared statement, as most implementations (including ours) have prepared statements tied to a particular connection, even inside the server. Therefore when you close the connection, they go away.

If you want this functionality, you should use a connection pool that caches prepared statements. Most application servers offer this, as well as third-party connection pools (I happen to like c3p0, from http://c3p0.sourceforge.net/)

-Mark

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.