首页 > 代码库 > 大表 update 方式

大表 update 方式

--declare  cursor cur_t is    select rowid rid from tpr_zwjyw3 where dwid=10113222;  type tab_t is table of urowid index by binary_integer;  l_rid tab_t;begin  open cur_t;  loop    fetch cur_t bulk collect      into l_rid limit 45000;    forall idx in 1 .. l_rid.count      update tpr_zwjyw3 t set t.zh =没有 where rowid = l_rid(idx);    commit;    exit when cur_t%notfound;  end loop;  close cur_t;end;

千万级别的数据 update 或delete  效果明显

大表 update 方式