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 > Performance Problem with update at middle of process

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-13-04, 15:50
mavazqg mavazqg is offline
Registered User
 
Join Date: Aug 2003
Posts: 4
Unhappy Performance Problem with update at middle of process

Hi,

I have a table with 26 million of records and other with 130000.

I need to update the bigger table with the other and I have indexes and the Explain show a good number for rons, however when run the update process...exactly when the process is in the middle the performance is down.

Somebody have a idea to fix this?

the query is:

UPDATE inafilia.IM_DERECHOHABIENTES D
SET (
NOMBRE, AP_PATERNO,AP_MATERNO,SEXO, FECHA_NAC, DOCTO,FH_DOCTO)
= (
select
CASE WHEN MO.TIPO_MOVIMIENTO = '01' THEN MO.NOMBRE
ELSE D.NOMBRE
END,
CASE WHEN MO.TIPO_MOVIMIENTO = '01' THEN MO.AP_PATERNO
ELSE D.AP_PATERNO
END,
CASE WHEN MO.TIPO_MOVIMIENTO = '01' THEN MO.AP_MATERNO
ELSE D.AP_MATERNO
END,
CASE WHEN MO.SEXO = '2' THEN 'F'
ELSE 'M'
END,
CASE
WHEN MO.TIPO_MOVIMIENTO = '01' THEN fecha_tms(MO.fec_NAC)
else
case
when d.fecha_nac is null then NULL
else d.FECHA_NAC
end
END,
'MO',
TIMESTAMP(CURRENT DATE,'00.00.00')
from UNICOSXNSS MO where MO.nss = D.NSS
)
where D.NSS IN (select nss from UNICOSXNSS)
;
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