-->
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.  [ 6 posts ] 
Author Message
 Post subject: What is the Fastest ID Generator
PostPosted: Wed Sep 21, 2005 10:58 am 
Newbie

Joined: Mon Aug 22, 2005 12:24 pm
Posts: 4
Hibernate version: version 3.0.3

Code between sessionFactory.openSession() and session.close():

All the program is doing is to trans.beginTransaction(), session.save(), session.flush() then trans.commit(), this is the whole cycle when inserting 1 record at a time.

Name and version of the database you are using:

PostgreSQL 7.4.1

IBM DB2 6.0

Server Not clustered.

The problem is it's taking time to insert all the 20,000 records , it took us 55 hours (more than 2 days) to load it in PostgreSQL.

For DB2, it took 15 hours just to insert the 10,000 records ..

Do you think it has to do with the ID Generator "increment" that we used for all the 5 tables that we have?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 11:08 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
It took your software 2 days to insert 20k records? Did you try to write them with magnets on the platters by hand? :) Seriously, your problem is not the primary key generator.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 11:29 am 
Newbie

Joined: Mon Aug 22, 2005 12:24 pm
Posts: 4
Thanks for the reply.

Another question to anyone who has tried this setup..

What is the normal benchmark time of inserting records using Hibernate 3.0.3 and PostgreSQL and DB2? Let's say 1000 records / ?? minutes

Thanks again..


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 2:32 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Did you try and copy the mass insert example from the reference documentation?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 5:25 pm 
Expert
Expert

Joined: Sat Jan 17, 2004 2:57 pm
Posts: 329
Location: In the basement in my underwear
Have you tried clearing your session from time to time? Take a look around for batch processing discussion. (I can't remember if it's in the reference doc or not).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 22, 2005 3:04 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
AEspiritu wrote:
Thanks for the reply.

Another question to anyone who has tried this setup..

What is the normal benchmark time of inserting records using Hibernate 3.0.3 and PostgreSQL and DB2? Let's say 1000 records / ?? minutes

Thanks again..


Normal time must be less than 1 sec for 1000 records on loptop.


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