| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.oracle -> Re: Using FORALL with associative arrays
Responding to myself here, as nobody else seem willing to :-)
It finally dawned on me that I can simulate LIMIT by taking manual control over the FORALL range. The following procedure is a very performant and scalable way to push data into oracle.
PROCEDURE testfast(par1 in testarray) is
startPos int;
endPos int;
begin
startPos := par1.first;
loop
endPos := startPos + 100;
if endPos > par1.last then
endPos := par1.last;
end if;
FORALL i IN startPos .. endPos
insert into dummy (test) values (par1(i));
startPos := endPos + 1;
exit when endPos = par1.last;
end loop;
![]() |
![]() |