Results 1 to 2 of 2
  1. #1
    Join Date
    May 2011

    Question Unanswered: db2 "procedure" time elapse

    hi guys,

    i need a small clarification.
    i had created a procedure to "insert" rows into a table and i tried to insert 1million rows it took more than 7 minutes to do that but

    i have a java code which "updates" the same table with same number of rows but its taking less than 2 the java code i used a prepared statement for updation.

    can any one help me by telling that how is this happening

  2. #2
    Join Date
    Jan 2009
    Zoetermeer, Holland
    You do not mention which version of db2, what O.S. and how many spindles you have. So is 1.000.000 inserts in 7 minutes good or bad? Dunno. If your table would NOT have any indexes at all you're observation could be odd. So please give us more info about the table and the indexes. Also which columns are updated and are those columns used in 1 or more indexes.

    And you procedure, does it fire 1.000.000 time an insert of adding 1 row? Or 1.000 inserts adding 1.000 rows at the time? Any commits in between?

    Please answer this questions and then, maybe, we can tell you what is happening.

Posting Permissions

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