This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes PreparedStatement caching Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "PreparedStatement caching" Watch "PreparedStatement caching" New topic
Author

PreparedStatement caching

Edy Yu
Ranch Hand

Joined: Nov 21, 2000
Posts: 264
One of the reasons to use PreparedStatement other than Statement is that PreparedStatement is implicitly cached, thus provides better performance.
But according to Oracle 9i JDBC Driver, by default, the implicit statement caching was disabled. Does this mean we have to enable the implicit statement caching on the connection first?
Thanks in advance.


<i><br />Sun Certified Programmer for Java 2 Platform (SCJP)<br />Sun Certified Developer for Java 2 Platform (SCJD)<br />Sun Certified Web Component Developer for Java2 Platform, Enterprise Edition (SCWCD)<br />Sun Certified Business Component Developer for Java2 Platform, Enterprise Edition (SCBCD)<br />Sun Certified Enterprise Architect for J2EE (SCEA)<br />IBM Certified Enterprise Developer, WebSphere Studio V5.0<br /></i>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: PreparedStatement caching
 
Similar Threads
oracle statement caching in connection pool
Is PreparedStatement cached in WebSphere?
Performance with preparedStatement.
Difference between Statement/Prepared statement?
Update in For loop.