-->
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: Performance problem
PostPosted: Mon Mar 08, 2004 10:35 pm 
Newbie

Joined: Mon Mar 08, 2004 10:17 pm
Posts: 2
Hi all,
I have a file (csv) having 216680 lines. I use this information and load the information into the Database after a bit of processing the data.
I am not loading the whole file into memory. I read record-by-record.
After processing about 100000 records, I see a lot of decrease in the perfomance of my program. I am seeing this by printing out the no. of records being processed every 5secs.

Before 100000(approx) records, i see 480 (approx) records being processed every 5secs. After 100000 records, only 1 record is being processed every 5secs.

I have seen the documentation, and used

Session.evict(Object); (After Session.save(Object);)
I also disabled caching. I used a profiler and found out that most of the time is taken by the Session.flush();. I dunno what to do now.

I am using Hibernate 2.1.2.

Any suggesstions pls.

-Vid.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 09, 2004 1:31 am 
Beginner
Beginner

Joined: Thu Feb 26, 2004 6:59 am
Posts: 47
Location: Gurgaon, India
Vid,

Have you tried Session.clear()?

or please give your code segment here, may be someone can help after reading the code.

_________________
Mohit Gupta
Software Engineer
Gurgaon, India


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 09, 2004 5:56 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
flush session, commit transaction and clear the session aproximately after every 10000 records. But what you are doing there is really not an ideal usecase for Hibernate, you should rather use the data import facitilies of your db.


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.