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.  [ 4 posts ] 
Author Message
 Post subject: Using Hibernate for doing massive db operations
PostPosted: Tue Nov 11, 2003 3:29 pm 
Newbie

Joined: Tue Nov 11, 2003 3:13 pm
Posts: 10
Hello!

I have this problem:

1. Traverse 147 million rows in one table, join it with another significantly smaller table

2. Apply some business logic for each row, possibly accessing the db several times doing this

3. Generating response objects for a few (meaning thousands) of these rows, again accessing the db several times

This will be done by a cluster of Websphere servers with several cpu:s. Several streams will be working in parallell, so the 147 million rows may be processed by say 20 threads, each doing 7-8 million rows.

Is is desirable or even possible to use Hibernate doing this? One thing I'm thinking of is the automatic caching. The big table couldn't (and shouldn't) be cached at all. Is it possible to disable caching or must I call evict for each object?

Could I use the default caches or should I build my own?

Any ideas, anyone?

Best regards,
P Poluha


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 11, 2003 10:22 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
This should probably not even be done in Java. Stored procedures are good for this kind of thing.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 12, 2003 3:15 pm 
Newbie

Joined: Tue Nov 11, 2003 3:13 pm
Posts: 10
We're opting for a Java solution as we've got pretty good (preliminary) results using parallel processing. And the business logic would be hard to code in PL-SQL.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 12, 2003 6:00 pm 
Newbie

Joined: Fri Sep 12, 2003 4:01 pm
Posts: 19
Two things to note:
* You can do Oracle stored procedures in Java. You can even have Java and PL/SQL call each other
* Oracle can do all sorts of parallelism internally to process a query faster. You do have to give it permission to devote all the server's processing power this way-- check the Oracle docs.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

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.