commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gamnacke <>
Subject Re: [dbcp] poolPreparedStatements parameter
Date Thu, 26 Feb 2009 10:21:07 GMT

Well, I am trying it out now per request from our DBA:s. If you use pooling
of prepared statements you will essentially only have to compile the SQL
once. However, the pool is per connection and not per JVM. So if you have
short-lived connections you won't benefit as much from it.

I am not aware of any performance costs that are due to pooling the prepared
statements over time. I assume it must be better to pool the statements than
to constantly recreate them.

There is one thing that strikes me though, and I've asked this in a previous
post (DBCP: Why is the validation query not a prepared statement). The
validation query is not executed as a prepared statement for some reason. 
View this message in context:
Sent from the Commons - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message