From: Damian Marinaccio
>From dspace.cfg:
>--------------------------------
># Determine if prepared statement should be cached. (default is true)
>db.statementpool = true
>
>--------------------------------
>
>I cannot find ANY documentation related to this statement. What are the 
>implications of turning it off/on.

Hi,

Well, as it says that the default is true, the first implication is that you 
can't turn it on - you can only turn it off ;-)

What it relates to is whether PreparedStatement objects are held in a pool 
(managed by DBCP).

Exact behaviour is rather dependent on the actual JDBC driver 
implementation, but pooling PreparedStatements is meant to eliminate the 
overhead of creating cursors and prevent repeated statement parsing/creation 
(I say meant - early Postgres drivers didn't hold cursors open on the 
database, and only pretended to support PreparedStatement).

So, a pool of PreparedStatement objects is generally a good thing - not 
having one will increase the execution time of frequently executed 
(parametized) SQL, and waste significant resources on the database in 
parsing, etc.

That said, maintaining open cursors on the database also takes resources. In 
particular, with some databases (ie. Oracle) the default statement pooling 
behaviour via DBCP as implemented in DSpace can overwhelm the database's 
defined ability to hold open cursors, resulting in errors.

Turning off statement pooling will reduce the open cursors on the database 
(which as seen above may be useful in some scenarios), at the cost of 
increasing the time and processing involved with executing each SQL query 
(reducing scalability).

What is missing from the current DSpace implementation is a configuration 
option to limit the number of PreparedStatement objects that get pooled 
(which is what is ideally required to strike a balance between holding open 
resources on the database and system scalability).

G 

This email has been scanned by Postini.
For more information please visit http://www.postini.com


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to