中国开发网: 论坛: 程序员情感CBD: 贴子 858590
Apache
有请各位DB牛,帮小弟解决个问题。
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;











相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录