Inserting large number of records in one transaction
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ashutosh_Chaurasia
Posted On:   Thursday, July 17, 2003 06:34 AM

BACKGROUND: I have a database issue related to EJB.Basically I want to perform a single transaction involving an insert into a database table.The number of rows inserted one by one can vary from 40000 to 200000.If there is any error then all transactions are rolled back.The environment used is J2EE,EJB on weblogic. PROBLEM: During insertion , there is a lock on the table which stops other users to insert even a single row at the same time.How can I insert the records intermittently so that there is an insertion of 100 each , followed by commit (which releases the lock) and then start inserting another block of 100. Alternatively if there is any other efficient way of doing this??    More>>

BACKGROUND:
I have a database issue related to EJB.Basically I want to perform a single transaction involving an insert into a database table.The number of rows inserted one by one can vary from 40000 to 200000.If there is any error then all transactions are rolled back.The environment used is J2EE,EJB on weblogic.

PROBLEM:
During insertion , there is a lock on the table which stops other users to insert even a single row at the same time.How can I insert the records intermittently so that there is an insertion of 100 each , followed by commit (which releases the lock) and then start inserting another block of 100.
Alternatively if there is any other efficient way of doing this??

   <<Less

Re: Inserting large number of records in one transaction

Posted By:   Christopher_Koenigsberg  
Posted On:   Thursday, July 17, 2003 11:04 AM

I would explore the possibility of writing them all out to a flat file, and doing a "bulk load" from there.

About | Sitemap | Contact