快速插入删除

来源:互联网 发布:mac apache安装目录 编辑:程序博客网 时间:2024/04/30 07:12

INSERT /*+append*/ INTO fact_sale_agent_agg2_new SELECT * FROM fact_sale_agent_agg2 NOLOGGING;


快速删除 
建个存储过程,达到2000条或者更多条,提交一次. 
create or replace procedure p_delete 
as 
n number(10); 
cursor my_cur is select * from t1; 
begin 
n:=0; 
for i in my_cur loop  
delete from t1 where <条件>; 
n:=n+1; 
if (mod(n,2000))=0 then 
commit; 
end if; 
end loop; 
end; 
来源


原创粉丝点击