[阅读: 529] 2010-11-12 16:52:43
Oracle 数据库,有一张表A
这个表大概有6个字段,其中4个有索引
现在要每天全表Update 一下,大约有1.6亿条记录
并且这张表一直有读的压力(有应用在一直跑)
有没有什么好的办法和建议?
我现在初步的思路是
cursor cur_a is select /*+ parallel(A,4) */ row_id from A
where order by rowid;
for row_x in cur_a loop
update A set X=xxx where rowid=row_xrow_id;
v_counter := v_counter + 1;
if (v_counter>=1000) then
commit;
v_counter := 0;
end if;
end loop;