我有一张包含600万条记录的MAIN_TABLE表。以下查询需要4个小时。有人可以建议性能改进
MAIN_TABLE结构。 FIELD1(NUMBER),FIELD2(VARCHAR),FILED3 ............
UPDATE MAIN_TABLE MT
SET
FIELD3 = (SELECT FLDA FROM TABLE1 where FLDX= MT.FIELD2 AND FLDZ='XYZ'),
FIELD4 = (SELECT FLDB FROM TABLE1 where FLDX= MT.FIELD2 AND FLDZ='PQR'),
FIELD6 = (SELECT FLDD FROM TABLE1 where FLDX= MT.FIELD2 AND FLDW='FGH');
循环有用吗?将人口分成多个线程会有帮助吗? 任何数据库提示都有效吗?