The update tmp_1 a set SFXZ='is' the where the exists (select 1 from tmp_2 where instr (a.a DDR, b.a ddr_all) & gt; 0);
commit;
A, b table data is around two hundred thousand, because the execution is slow, be killed, optimal solution, using forall
CodePudding user response:
The update tmp_1 set SFXZ='is'Where the primary key (in the select a. primary keys from tmp_1 a, tmp_2 b where instr (a.a DDR, b.a ddr_all) & gt; 0);
CodePudding user response:
Tmp_1 and tmp_2 relying only on instr (a.a DDR, b.a ddr_all) & gt; 0 this condition, can produce combination is multiplied by 200000, 200000 is 40 billion, this is not out the results, adding a two tables associated conditions, reduce the amount of associated combination can be,