Re: MySQL - PreparedStatement problem
Posted by: s.a.w.gooren
Date: January 20, 2005 06:03PM

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.

Options: ReplyQuote

Written By
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.