bulk collect forall通过limit批量提交
2012-10-19 09:33
405 查看
declare
type forall_table is table of tb1%rowtype;
test_table forall_table;
cursor c1 is select *
from infores_nb1.tb1 a
where exists (select 1
from infores_nb1.t2 b
where a.subscode = b.worksheetcode)
and a.intftype in ('resourceConfig', 'resourceRollback')
and a.succeed = 1;
begin
open c1;
loop
fetch c1 bulk collect into test_table limit 1000;--1000行提交一次;
forall idx in test_table.first..test_table.last
insert into tb1_tmp values test_table(idx);
commit;
exit when c1%notfound;
end loop;
close c1;
exception
when others then
rollback;
end;
type forall_table is table of tb1%rowtype;
test_table forall_table;
cursor c1 is select *
from infores_nb1.tb1 a
where exists (select 1
from infores_nb1.t2 b
where a.subscode = b.worksheetcode)
and a.intftype in ('resourceConfig', 'resourceRollback')
and a.succeed = 1;
begin
open c1;
loop
fetch c1 bulk collect into test_table limit 1000;--1000行提交一次;
forall idx in test_table.first..test_table.last
insert into tb1_tmp values test_table(idx);
commit;
exit when c1%notfound;
end loop;
close c1;
exception
when others then
rollback;
end;
相关文章推荐
- orcle 批量提取和批量插入 BULK COLLECT and FORALL
- oracle批量绑定 forall bulk collect用法以及测试案例
- oracle批量绑定 forall bulk collect用法以及测试案例
- bulk collect forall等批量更新优化方法比对【视频】
- oracle批量绑定 forall bulk collect用法以及测试案例
- 再收藏一篇: oracle批量绑定 forall bulk collect用法以及测试案例
- 大数据量下的DML操作 bulk collect into limit forall commit;
- oracle批量绑定 forall bulk collect用法以及测试案例
- oracle10g批量绑定forall bulk collect
- Bulk Collect/FORALL的性能测试
- 转:Oracle 10g批量绑定forall bulk collect
- Bulk Collect/FORALL的性能测试
- forall and bulk collect
- Adding a limit to BULK COLLECT
- Oracle 中使用 fetch bulk collect into 批量效率的读取游标数据
- oracle10g代码中内置了BULK COLLECT limit为100
- Oracle 中使用 fetch bulk collect into 批量效率的读取游标数据
- 批量执行 bulk collect与forall用法
- fetch bulk collect into 批量效率的读取游标数据 【转载】
- 转载--ORACLE批量绑定FORALL与BULK COLLECT