Re: MySQL - PreparedStatement problem
Well, actually, there are a number of cases where PreparedStatements are useful (this list is not complete, but just to name a few):
- The JDBC driver handles escaping the data. You mention BLOBs, but Strings will be escaped automatically as well, which you would have to do yourself when concatenating.
- Performance: The RDBMS can cache the query, instead of calculating an execution path for every time it's called. Whenever you re-execute the PreparedStatement, the JDBC driver only sends the parameters. When running the same query (with different params) a large number of times this can increase performance quite a lot.
Subject
Written By
Posted
November 15, 2004 03:49AM
November 15, 2004 09:09AM
February 15, 2005 06:23AM
November 15, 2004 01:11PM
Re: MySQL - PreparedStatement problem
January 20, 2005 06:03PM
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.