首页 > 其他 > 详细

大表 update 方式

时间:2014-12-31 16:00:28      阅读:131      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!