-->
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: Updating/Fushing strategy for huge amounts of data
PostPosted: Sun Jul 27, 2008 9:16 am 
Beginner
Beginner

Joined: Tue Jan 22, 2008 11:33 am
Posts: 46
Hi,

I was wondering if their is a best practice around for updating/flushing huge amount of data. I have mapping on a table of 65000 rows and about 50 columns (some of them are more then 1000 bytes long).

Now I want to retrieve all entries in a n object collection. Works fine without problems. I have them in a List<MyObject>. Now I go over all Objects in the list and want to change certain values in each Object.

First I tried to make all changes and did a session flush afterwards. This approach caused exceptions, since it was obviously too big.

Second I tried to do an update of all Objects against my Database. here the pseudo code
- beginn transaction
- loop over my List
- update(single Object in my List)
- end of loop
- transaction commit

Unfortunately I received the same error as with the described flushing approach.

Now I flush after each Object changed. Of course it takes a lot of time, but at least it works. Is their any best practice for these amounts of data??

Thanks in advance for your feedback

antoschka


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.