File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes JDBC vs DB2 Export - Performance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC vs DB2 Export - Performance" Watch "JDBC vs DB2 Export - Performance" New topic

JDBC vs DB2 Export - Performance

Jaime Garcia
Ranch Hand

Joined: Jan 07, 2003
Posts: 38
I am working with DB2 and I have to export (2 times per day) a lot of information from a table (DB2 database). I Know that exist a Utility from DB2 (export utility) but, because I need to update the rows that I export, I would prefer to use JDBC (I think that I could have more control with JDBC) but I am worried about performance.
Dose any body Know if the export utility is faster (and better) than using JDBC ?
I Know that importing information is better to use the load Utility, but export information just read rows, so I think (hope) is mostly the same.
Monty Ireland
Ranch Hand

Joined: Oct 03, 2000
Posts: 161
the answer is, it depends.
if you are doing a strait extract, export will be much faster.
if you need to extract data population A and update data population B
at the same time. then you have to code and application.
pgm begin
select ...
update ...
pgm end
Try to use JDBC 2.0 with addBatch() / executeBatch() if possible.
Hope this helps

Multi Platform Database Developer & DBA on E.S.T.
I agree. Here's the link:
subject: JDBC vs DB2 Export - Performance
It's not a secret anymore!