If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > db2 "procedure" time elapse

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-26-11, 04:53
raviteja raviteja is offline
Registered User
 
Join Date: May 2011
Posts: 1
Question 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 minutes.in the java code i used a prepared statement for updation.

can any one help me by telling that how is this happening
Reply With Quote
  #2 (permalink)  
Old 05-26-11, 06:43
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On