Bulk Collect Operations Performance Optimization in PLSQL
Bulk Collect Operations Performance Optimization in PLSQL
Page 1 of 4
APPS TO FUSION
.......Our Journey from Apps To Fusion
Home
Technical Articles
Contributors
RELATED ITEMS
FORALL operations
(performance
Training Articles
Forum
My Book
Solutions
Anshuman Ghosh
optimization) in
PL/SQL
User Rating:
Poor
SEARCH
APPS2FUSION
/3
Best RATE
SEARCH
Without using Bulk Collect
The slow (read inefficient) way to do it is to read the cursor row by
row, and process the data.
ExampleDECLARE
my_sal emp.sal%TYPE;
CURSOR c1 IS SELECT sal FROM emp WHERE job = my_job;
BEGIN
...
http://apps2fusion.com/at/gt/ag/253-bulk-collect-operations-performance-op... 2/26/2013
Page 2 of 4
OPEN c1;
LOOP
FETCH c1 INTO my_sal;
EXIT WHEN c1%NOTFOUND;
bonus := sal * 0.15;
... further processing (business logic)
...
...
END LOOP;
END;
Performance metrics
If you wish to have real time metrics of advantages of using bulk_collect, we can do so
by timing the processes - once using normal cursor operation and once using bulk
collect.
Hits: 7991
Email This
Bookmark
Set as favorite
Comments(5)
Subscribe to this comment's feed
http://apps2fusion.com/at/gt/ag/253-bulk-collect-operations-performance-op... 2/26/2013
Page 3 of 4
Hi Anil
Can you please guide me how to use DBMS_SCHEDULER for a stored
procedure where the frquency for the program should be for every three min.
Regards
Sridhar
Votes: +1
vote up
vote down
report abuse
vote down
report abuse
...
written by nani , May 26, 2008
Hi ghosh,
Thanks a lot for guidence on bulk collect
Votes: +2
vote up
THANKS
written by needhelp , May 30, 2008
vote up
vote down
report abuse
how an plsql table can be used in select and i want to send it as trhrough
refcursor as out parameter can u explain it
Votes: +0
vote up
vote down
report abuse
...
written by Anshuman Ghosh , June 03, 2008
Venki,
In the bulk collect example given above, "l_employees" is indeed a pl/sql table.
TYPE employees_collection IS TABLE OF employees&#xRO;WTYPE INDEX
BY PLS_INTEGER;
l_employees employees_collection;
Followed by -
http://apps2fusion.com/at/gt/ag/253-bulk-collect-operations-performance-op... 2/26/2013
Page 4 of 4
vote up
vote down
report abuse
Write comment
Name
Title
Comment
smaller | bigger
Subscribe via email (Registered users only)
Add Comment
http://apps2fusion.com/at/gt/ag/253-bulk-collect-operations-performance-op... 2/26/2013