The performance problem of server side PreparedStatement?
Posted by: Li wy
Date: December 14, 2004 06:46AM

I test the PreparedStatement performance comparing with createStaement based MySQL server 4.1.7 and Connector/J 3.1.5. And I find the PreparedStatement will have better performance only when I use the same PreparedStatement object before closing it. If I close it and re-create it by invoking connection.preparedStatement() again with the same SQL string, it will get worse performance than directlly using createStatement().
How ever, I think this is a problem since the Connection should cache the PreparedStatement object for re-using purpose. Otherwise, it will increasing the developer effort for caching these PreparedStatement objects.

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.