B
Bharat
Guest
Below query actually updating more than 2 lakhs records and it takes 19 hours to finish it. Need your help to tune it for increasing the performance.
Continue reading...
Code:
DEFINE TEMP-TABLE tdata no-undo
field tptpart as character
field tptsts as character
field ttype as character.
empty TEMP-TABLE tdata.
INPUT FROM /sdd/aert/import.csv.
repeat:
create tdata.
IMPORT DELIMITER "," tdata.
end.
INPUT CLOSE.
FOR EACH tdata
WHERE tptpart = "":
DELETE tdata.
END.
etime(true).
FOR EACH tdata:
FOR FIRST xx_mstr
WHERE xx_domain = "XX"
and xx_part = tptpart
exclusive-lock use-index xx_part:
assign
xx_mstr.xx_status = ttptsts
xx_mstr.type = ttype.
end.
release xx_mstr.
end.
message "This took" ETIME "milliseconds" VIEW-AS ALERT-BOX.
Continue reading...