I have to following sql for an oracle database on AWS RDS
BEGIN
FOR user_id_count IN 1..4000 LOOP
INSERTUSERINTOFINALTABLE(user_id_count);
END LOOP;
END;
where the INSERTUSERINTOFINALTABLE PROC is defined as follows
INSERT INTO FinalTable (USERID, ABC, DEF, ...,XYZ )
select
a.USERID,
b.ABC,
b.DEF,
....
b.XYZ
from a
left outer join b on a.USERID = b.userid
where a.userid = USER_ID and b.XYZ not in ( select XYZ from c);
The reason why I am not doing it for all the user as a simple insert int is because my data is really big and wanted to make sure I don't run out of memory.
The question is, is there a way to run this in parallel in oracle?
Thanks