-->
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: Statement caching and batch/association queries queries
PostPosted: Tue Aug 26, 2014 1:01 pm 
Newbie

Joined: Tue Aug 26, 2014 12:56 pm
Posts: 1
Oracle uses a lot of memory for prepared statements (which c3p0 is caching), so I'm investigating why I have so many. It turns out they're of the form:

Code:
select p0_.R_ID as R4_28_1, ...
from P p0_
where p0_.R_ID in (?, ?, ?, ?, ?, ?, ?) /* varying number of arguments */


I have many such prepared queries, with varying numbers of question marks.

Is there any way to configure Hibernate to always use the same queries? How have other people worked around this?

Thanks!

For those curious, I took a heap dump with jmap and used Eclipse MAT with the following OQL to get at this.

Code:
SELECT objects s.sqlObject.odbc_sql.value
FROM oracle.jdbc.driver.T4CPreparedStatement s WHERE (s.@retainedHeapSize > 1000000)


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.