-->
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: Hibernate Ist Level Cache
PostPosted: Tue May 12, 2009 10:59 pm 
Newbie

Joined: Tue May 12, 2009 10:49 pm
Posts: 1
I am observing that in a single transaction while looking up distinct records the hibernate gets really slow. The reason is that because unique records are looked up and hibernate caches them and every new record that is looked up, the hibernates looks the item in the query, basically iterating through its cache list. This lookup time increases as hibernate cache builds up. I am talkign about ~ 1000 item look ups. My question is

1. Why does hibernate get slow with unique item lookup. What mechanism is it using to lookup the item in the cache?
2. While hibernate looks the item first in the cache before loading it from database, it DOES NOT call persistent objects hascode and equals method.Again how does it lookup item?
3. Is there any solution to to the slowness other than clearing the session cache every tome item is looked up?

I am not using level 2 cache.

Appreciate your responses/suggestions.

Wichka


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.