-->
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.  [ 3 posts ] 
Author Message
 Post subject: Large read-only dataset
PostPosted: Tue Feb 03, 2004 6:13 pm 
Newbie

Joined: Sun Oct 26, 2003 4:46 pm
Posts: 16
Location: Tallinn, Estonia
Hello,

I am writing a reporting application. It involves gathering data from a couple of unrelated tables. One of the tables is a huge one. The datasets fetched from there could also be quite big (we agreed that at least up to 20,000 rows should be handled). This table is populated by other processes, my job is only to read from that table.

I am right now wondering whether using Hibernate for this task is a good idea or not. This is all strictly read-only and caching can't be used either. The benefit of Hibernate would be that I wouldn't have to code the data loading from the ResultSet myself. However isn't it true that Hibernate keeps a copy of the loaded objects in the session? This would mean a lot of extra memory usage. Even with FlushMode.NEVER Hibernate must still be prepared that I call flush() manually?

Any comments would be greatly appreciated.

_________________
best regards,
erik


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 03, 2004 6:19 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You can evict() the object from the Session immediately after loading it. However, if your application is not cross-plattform (databases) and you just map the result to some simple report JavaBeans and don't have any complex logic in your application (just displaying the beans), there is no real win here compared to plain JDBC and a direct display of data from resultsets.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 03, 2004 6:56 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
I would suggest using something like iBatis DB layer if you just care about bean population. Hibernate is probably overkill in that case.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.