Hi,
I have a code where it traverses through each record froma table and creates records in another table. I use FOREACH cursor to do this, i'm using another cursor inside the FOREACH to fetch the details of other table. Please suggest me which would be more efficient, as this will run against millions of records, i have to make it efficient as much as i can.
--pseudo--
source tables - a, b
target table - c
code 1-
cursor a;
cursor b;
FOREACH a
fetch cursor b
insert to table c
END FOREACH
code 2-
cursor a {table a OUTER table b}
FOREACH a
insert to table c
END FOREACH