ORACLE SQL在单个存储过程

时间:2017-04-06 16:07:10

标签: oracle stored-procedures

我编写了一个存储过程,它有10个串联的DML语句,每个DML语句大约需要3分钟才能执行。总存储过程在生产中运行大约29分钟(每个DML转储数百万条记录)。

我需要单独使用前两个DML语句才能串行运行,其余8个可以并行运行,因为它们没有依赖性。

需要建议才能在不使用dbms_job或dbms_scheduler

的情况下实现此目的
begin
insert all into table1 values () 
insert all into table2 values () 
select ...;
insert into table3 select ... from table1 join table2...;
insert into table4 select ... from table2 join tableA...;
insert into table5 select ... from table1 join tableB...;
insert into table6 select ... from table1 join tableC...;
insert into table7 select ... from table1 join tableD...;
insert into table8 select ... from table1 join tableE...;
insert into table9 select ... from table1 join tableF...;
insert into table10 select ... from table1 join tableG...;
end;

0 个答案:

没有答案