Home » SQL & PL/SQL » SQL & PL/SQL » bulk collect inside a cursor
bulk collect inside a cursor [message #36514] Sun, 02 December 2001 12:27 Go to next message
Venki
Messages: 2
Registered: December 2001
Junior Member
Hi,
Scenario:
I have a "bulk collect into" statement inside a cursor. The syntax is correct and the pgm is working. But it is slow because I am processing 1.5 million rows. The bulk collect populates say 10 array each with 1.5 million rows. Using a For loop I then parse through the entire length of the array and update values for some of these 10 columns values. After the for lop I have a FORALL bulk update statement. For such a large number of rows, Oracle needs a huge rollback segment for the update.

Question:
Can I have a limit on the bulk collect to say 3000 rows. I bulk collect 300 rows into the 10 arrays, process them , do a bulk update for the 300 rows and then fetch the next 3000 rows until the 1.5 million rows are processed? I am trying to find examples of this but am unable to? Thanks in advance

----------------------------------------------------------------------
Re: bulk collect inside a cursor [message #37902 is a reply to message #36514] Tue, 05 March 2002 11:15 Go to previous message
Sunil
Messages: 132
Registered: September 1999
Senior Member
from oracle 8.1.6 onwards you can use limit clause to the BULK COLLECT
Previous Topic: sql question
Next Topic: How to see other account's table structure in JDBC
Goto Forum:
  


Current Time: Sun May 05 03:55:55 CDT 2024