-->
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: Increasing size of the prepared statement cache in cfg.xml?
PostPosted: Tue Jul 10, 2007 3:48 pm 
Newbie

Joined: Fri Jan 12, 2007 7:13 pm
Posts: 4
Hibernate version 3.2.4


We are attempting to speed up our Hibernate generated SQL running against an Oracle database. A db trace of the Oracle db indicates that each execution of a SQL statement causes a re-parse (and recompilation?) of the statement.

As far as I know, Hibernate should use Prepared Statements 'under the hood' by default. Is that true? If so, the statements shouldn't be getting reparsed.

Another possibility is that the size of the prepared statement cache is too small. Is there a way - via the hibernate.cfg.xml file - to increase the size to the DB/JDBC driver's prepared cache?

I've seen this option used in DataSource configuration files:

prepared-statement-cache-size

Is there a way to specify this in the hibernate.cfg.xml file?

FWIW,

Here are the relevant settings in our hibernate.cfg.xml file:


<property name="hibernate.jdbc.batch_size">1000</property>
<property name="hibernate.jdbc.fetch_size">200</property>

<property name="hibernate.default_batch_fetch_size">32</property>
<property name="hibernate.jdbc.use_get_generated_keys">true</property>
<property name="hibernate.max_fetch_depth">5</property>

<property name="hibernate.connection.pool_size">1</property>
<property name="hibernate.connection.autocommit">false</property>
<property name="hibernate.cache.use_query_cache">false</property>
<property name="hibernate.cache.use_second_level_cache">false</property>


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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.