Qusetion about pooling PreparedStatement
Is it worth considering even in eneterprise apps handling hundreds of queries per second? What are potential performance benefits?
Also how does it work internally? Does the pool manager bind each statement to particular connections in the pool for good or is the binding dynamic too?
Message was edited by:
mdoubledragon
> Is it worth considering even in eneterprise apps
> handling hundreds of queries per second? What are
> potential performance benefits?
I'm not following you at all. Your application's requirements will drive how much db access needs to be done.
> Also how does it work internally? Does the pool
> manager bind each statement to particular connections
> in the pool for good or is the binding dynamic too?
Here's what I think you need to know: PreparedStatements are used to instruct the database (or driver rather) that you are going to reuse this query over and over. So by using PreparedStatement, you're basically telling the database to cache the query plan so that future invocations are fast as possible.