sql优化
数据库为db2,数据量在百万左右。
如何修改才能提高速度。
原来的sql:
update NWH.GCUST_MOWN a
set expgroup_date = (select expgroup_date
from nwh.gcust_history b
where bc_flag = '0'
and a.cust_id = b.cust_id
and a.bc_flag = b.bc_flag
and time_id = 20110104)
where a.bc_flag = '0' with ur