-->
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: insert Collections and cache
PostPosted: Tue May 31, 2005 7:55 am 
Beginner
Beginner

Joined: Mon Nov 08, 2004 11:58 am
Posts: 29
I would like to start a discussion about inserting collections and cache

At the moment hibernate will treat a collection creation like and update in respective to caching. it will invalidate the CacheEntry. This is a huge performance nag as the first read of that collection will always go to the database. In my case there are 100s of concurrent reads that all go to the database, because the cache is not initialized.

To make it worse, I know that the collection will never be modified concurrently. The structure of my application garanties that. This makes the cautious caching stratagy for collection inserts even more painful.

I understand that the normal stratagy is to invalidate upon update/creation of collections to prevent concurrency problems. But I was wondering if this is also true for transactional and nonstrict-read-write cache.

nonstrict-read-write: per definition does not care about concurrency

transactional: the database insert and the cache insert would be in one transaction. per definition there should not be an update to the collection before the insert is in the cache.

The important thing is that collections are currently very bad for performance as the first access to a persistent collection will ALWAYS go to the database.

It would be great to have a solution for that.


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.