Results 1 to 4 of 4

Thread: Inputs for Spring batch performance comparison with DB2 import / export command

  1. #1

    Default Inputs for Spring batch performance comparison with DB2 import / export command

    Hello All,

    We used db2 import / export in our application through unix script for daily jobs.

    Now we have switched over to Spring batch.

    And we are finding that spring batch's performance is better then db2 import / export command in terms of the time taken to load / unload n number of records.

    Finding it strange!!

    Can anyone please provide reasons for this. Why spring batch performance is better then db2 import / export commands which are written in native language (C ?? ) and thus are supposed to be fast (as far as i know!! )

    Thanks,
    Nik

  2. #2

    Default

    its a very old article, but Tips for improving INSERT performance in DB2 Universal Database gives a nice overview, especially this might be interesting for you:

    Before we discuss optimizing inserts in detail, let's consider the alternatives to inserts: load and import. The import utility is essentially a front end for SQL INSERTs, but some of its capabilities may be useful to you. Load also has useful extra features, but the main reason for using load instead of inserts would be improved performance.
    see db2 doc (v9, but v8 is the same in this part) too

    The import utility adds rows to the target table using the SQL INSERT statement. The utility issues one INSERT statement for each row of data in the input file.
    Last edited by michael.lange; Sep 30th, 2011 at 03:44 AM.

  3. #3

    Default

    Hello Michael,

    Thanks for your reply!!

    Do you mean that Spring Batch uses Load (and not import) for inserting data into database which results in improved performance as compared to import ??

    Nik

  4. #4

    Default

    Quote Originally Posted by nikunj_c View Post
    Do you mean that Spring Batch uses Load (and not import) for inserting data into database which results in improved performance as compared to import ??
    Nik
    erm no,spring batch or better jdbc works with insert statements

    if you would use spring batch with commit-rate 1 it would work similar to db2-import, db2-load should always run faster than even a high performant multi-thread batch, but db2-load can't provide sophisticated transforming/data-enriching functions

    so its basically

    db2-import = spring batch with commit-rate 1
    db2-load = no equivalent with spring batch

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •