× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Wayne,

Have you looked at addBatch() and executeBatch()? Instead of using the
execute() function to insert records into your database, you use addBatch().
Then when you're done inserting, use executeBatch() to send the whole set of
inserts to the database.

Check out
http://java.sun.com/products/jdk/1.2/docs/guide/jdbc/spec2/jdbc2.0.frame6.ht
ml for a better explanation.

Hope this helps!
Richard

-----Original Message-----
Subject: RE: Bulk load on AS/400 DB2

David,

I have very large amount of rows (~400,000) need be either updated or
inserted into DB2 tables after the data are processed by a Java program.
JDBC rs.updateRow() method performs update row by row. It takes a lot of
times.  In inserting case, to execute insert SQL statement row by row also
takes a lot of time.  I am thinking that may be I could save the results
from Java program into a file and then loading this file into DB table at
one time.  Any suggestions?  Thanks.

Wayne


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.