I have a system where a fair share of my domain objects are read-mostly. There is a distinct phase of operation where updates are made. Outside of that phase, these objects are read-only.
What is the best strategy for dealing with these objects? The most critical of my objects is essentially a bag of ids. There are 35K top-level containers and each container has 10 different types of ids. Therefore one of my tables is about 350K records. Too expensive to pre-load (at least in development). The feature that seems to be really slamming my performance right now is the dirty checking. These objects aren't dirty but I still see a lot of time going into Session.flush() even when I haven't changed a significant number of objects. One approach I thought of is evicting objects after load (I always do lookups with db ids to ensure cache hits). Is there a way to do this automatically on a class-by-class basis? I am hoping to keep my reference objects out of the 1st level cache to eliminate the dirty checking. One rub I see with this is most of the time I just need my top-level container. Occasionally I need to load the ids. This requires my top-level object to be associated with the Session. If I evict after load, do I have to re-associate my container with a "load into" prior to accessing the (possibly cached) set of ids? Any recommendation would be greatly appreciated. Thanks, Ted ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel