码迷,mamicode.com
首页 > 其他好文 > 详细

大表 update 方式

时间:2014-12-31 16:01:30      阅读:186      评论:0      收藏:0      [点我收藏+]

标签:

--

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 方式

标签:

原文地址:http://www.cnblogs.com/tianmingt/p/4195754.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!