memory allocation for pl/sql tables is unbounced. you can make your arrays so
big that you use up so much memory on a server that you cannot make a SSH
connection to the server and cannot connect to sqlplus.
A guy on a previous project of mine did a large unbounced bulk collect and we
had to hard kill oracle(we already had connections the server) from the OS
level.
not sure where it gets stored, but it will keep taking free memory from your
system.
i dont think storing all this in an array would make that much of a difference.
The best way to i mprove performance of this kind of thing is to look at the
algorithm and see if there is a better way to do it and to see if you can
parallelize your steps. For example, can you open up some oracle jobs and run 3
things at the same time.