Update Multiple Column with Single Command with Join between Two tables.
This is our command where we are trying to update a table's two columns by pulling values from another table after joining. This query takes too much time to execute. Any suggestions ?
UPDATE raw_alc_rmfscombinednew
SET (BSC, CELL_NAME) =
(
SELECT distinct raw_alc_R110combinednew.BSC, raw_alc_R110combinednew.CELL_NAME
FROM raw_alc_R110Combinednew
WHERE
raw_alc_R110Combinednew.OMC_ID = raw_alc_rmfscombinednew.OMC_ID
AND raw_alc_R110Combinednew.CELL_CI = raw_alc_rmfscombinednew.CI
AND RAW_ALC_R110COMBINEDNEW.START_TIME = RAW_ALC_RMFSCOMBINEDNEW.START_TIME
)
--------------------------------------------------------
Results of Last execution:
--------------------------------------------------------
Elapsed Time (sec) 4,476.56
CPU Time (sec) 4,471.88
Wait Time (sec) 4.68
---------------------------------------------------
Executions that Fetched all Rows (%) 100.00
Average Persistent Mem (KB) 32.43
Average Runtime Mem (KB) 31.59
--------------------------------------------------------------