The advantage is that the SQL in the prepared statement is precompiled in the
DATABASE. So no matter which connection, or even which user, when the same
prepared SQL is used again, the database already has the SQL compiled and ready
to execute as soon as you send the parameters

Jason Kilgrow wrote:
> 
> What would be the advantage of using a PreparedStatement rather than
> a Statement if I'm using connection pooling?
> 
> I know that the PreparedStatement is precompiled but in my
> environment, I typically get a connection from the pool, execute my
> query, process my results, and then free the connection all in one
> method. So, if I were using a PreparedStatement, wouldn't the query
> in the PreparedStatement need to be compiled every time the method is
> called anyway?

To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to