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: Does HIbernate load all rows in the cache for queries?
PostPosted: Wed Nov 12, 2003 7:44 pm 
Newbie

Joined: Tue Nov 04, 2003 12:41 pm
Posts: 6
I have an application that queries a table, reads each row, does some processing, writes the formatted row to a JMS Q and then updates some columns of the row. The writing to the Q and row updates have to happen in a transaction. I commit after every 50 transactions.
Using Hibernate 2.0, I am getting a performance of 3 records processed per second. This is when the query returns 1000 rows. If I make 200 queries such that only 50 rows are returned at a time, the performance doubles.
What is going on here? Does Hibernate cache all rows when the query is executed. I am using "session.iterate()". Is it filling up the cache? (each row is huge). Is that why selecting in small batches runs fatser?
If I evict() each object as it is updated, will it help? Will the data get saved if I evict() the object before calling commit()?
Any performance improvement pointers will help!

Vaishali

P.S. I know the time is in the Hibernate calls because I ran this app with the profiler turned on.


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.