Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can i use hibernate for bulk data migration

 
jeff rusty
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,

Can i use hibernate to read atleast 5lakhs records from an intermediate staging table(150 columns) and store it into my transactional tables using hibernate? Will i have a good performance if i use hibernate?
if not how can i achieve this through normal JDBC?Please share your thoughts on this.

thanks,
jeff
 
jeff rusty
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anyone?
 
Reehan Lalkhanwar
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate is used to map DB with the app. So I think if the below is a one time operation then JDBC would be better.
But if you do it regularly and if the tables have large relations, then you can profit by lazy-loading feature of hibernate.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jeff rusty wrote:Hello friends,

Can i use hibernate to read atleast 5lakhs records from an intermediate staging table(150 columns) and store it into my transactional tables using hibernate? Will i have a good performance if i use hibernate?
if not how can i achieve this through normal JDBC?Please share your thoughts on this.

thanks,
jeff


Yes you can (read t he documentation for batch processing). I've no idea what a lakh is, but if it is a large number (like say a few million) you are probably better using the bulk loading tools supplied with your database rather than Hibernate or JDBC. They offer far more configuration options to control performance.
 
Reehan Lalkhanwar
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FYI: One Lakh = 1,00,000 = 100,000 = One Hundred Thousand.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic