-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Prepare Statement Caching
PostPosted: Wed May 07, 2008 3:29 am 
Newbie

Joined: Wed May 07, 2008 3:08 am
Posts: 2
Hi,

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 in between 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.

Is there any way to reuse prepared statements across batches? We have also enabled prepare statement caching but that also doesn't seem to help.

Please provide inputs on this if anybody has tried/encountered this or something like this (preapred statement caching) before.

Regards,
Lalit


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.