I have a simple PL/SQL procedure, with one cursor and I iterate over it. In each iteration I make an UPDATE statement (after performing some business logic to the data).
However, if there are lots of iterations (tens of thousands), this can get pretty slow, because in every iteration there is single UPDATE statement.
Is there a way to somehow “delay” those updates so that they are executed all at once (and thus much faster).
Edit: Oracle 11
If you can’t figure out how to use straight SQL (avoiding the for loop all together) then you will likely be able to improve performance using the BULK Collection features of pl/sql.
Example article here.
Syntax excerpt