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

Add batch (batch insertion into the database)

 
moh sak
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

i'm trying to insert large number of rows to the database , about 100,000 record and i want to insert them every 35,000 record, when i fill the heap i success inserting about 34,000 record after that i fail .

any ideas ? any one understand what i'm trying to say !??!!

thanx in advance
[ July 04, 2005: Message edited by: moh sak ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moh,
My guess is you need more memory (or smaller batches.) Why not just commit after every 20,000 records?
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If transaction is an issue and you want to insert 100,000 records in your table then insert them in temp table using small batches then move data to master table.
Otherwise I will also prefer using smaller batches as Jeanne said

Shailesh
 
moh sak
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

thanks for your replay i'll try it out and it must work since i'll devide the data into smaller chuncks

thanks very much
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic