I have a sql, as I do some separate select, it works fine and the database I am working on has no much data either.
but whenver, I runs the update, it stucks, I can`t tell if it is running or stuck.
So, for those sqls that take longer time to run, how can we tell if it is still running or dead?
also, could you take a look at sql below and tell me a way to optimize it? Rewritting is hugly encouraged :D
UPDATE ims_alctn a
set a.ssc_cstn_sfkp_acct =
(select regexp_substr(d.CHNGE_DATA_1,'~'||350||'[^~]+~')
FROM ims_alctn_hstry d
WHERE d.ims_trde_hstry_id in
(select max(ims_trde_hstry_id)
from ims_alctn_hstry c
where regexp_substr(c.chnge_data_1,'~'||350||'[^~]+~') is not null and c.ims_trde_oid in (
select ims_trde_oid from ims_trde where service_type ='IMS' and ims_trde.msg_typ = 'FX' and ims_trde.stlmt_dt >= sysdate-7)
group by c.ims_alctn_oid));
Thanks