UPDATE bmcc05t01 a SET (a.cust_id) = (SELECT b.cust_id FROM CMAA32T01 b WHERE b.certi_type_cd = '01' and b.CERTI_KEY =a.jumin_biz_no ) 조인하여 update하는 간단한 sql문이지만 전체건 scan하여 update하는 경우 매우 느립니다. 아래와 같이 바뀌면 순식간에 update됩니다. MERGE INTO bmcc05t01 a USING (select cust_id, certi_type_cd,CERTI_KEY from CMAA32T01) c ON (c.certi_type_cd = '01' and c.CERTI_KEY = a.jumin_biz_no ) WHEN MATCHED THEN UPDATE SET a.cust_id = c.cust_id 저작자표시 |