Prepare Statement Caching
-------------------------
Key: HHH-3271
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3271
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.5
Environment: Hibernate 3.2.5, Oracle 10g
Reporter: lalit railwani
We are using Hibernate 3.2.5 are trying to evaluate hibernate batching vis a vis JDBC
batching.
As per our results the hibernate batching takes approx 2 times the time taken by JDBC
batching.
The problem is we need to commit the batches also so in a loop we are commiting the
transaction also (batching).
But for every new loop hibernate creates new prepared statements i.e. if we have 20
batches 20 prepared statements per table/entity are being created but in case of JDBC the
same can be done using 1 prepared statement per table/entity.
Hibernate does reuse the prepared statements within a batch but not across batches. If
hibernate can reuse these statements it would significantly reduce the timings and would
bring the hibernate batching close to jdbc batching.
This is happening even after enabling prepare statement caching in the hibernate cfg xml.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira