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 > update statement for 500000 rows

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-10-11, 01:20
samsince85 samsince85 is offline
Registered User
 
Join Date: Apr 2011
Posts: 5
update statement for 500000 rows

Hi
I am new to DB2.
I need to do an update for 500000 rows in a table. Can somebody help me with the query?
Something like bulk update which can be faster...
Reply With Quote
  #2 (permalink)  
Old 04-11-11, 06:04
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
How about the "good old" 80/20 rule? Those 500,000 rows, are they more or less than 20% of the totoal number of rows in the table?
If more
THEN EXPORT in a seq.file, update the records in the seq.file and reload the file into the table (db must be quiesced)
ELSE just code and execute the UPDATE query(s). See if you can divide the set into logical chunks and include that logic in you where clause. This will take the pressure off the log bottleneck.
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