Vous êtes sur la page 1sur 4

D o y o u w a n t t o m e e t y o u r f e l l o wF a Oc re ab c o l oe k A p p s C o n s u

HOME ABOUT ME: SHAILENDER THALLAM CONTACT ORACLE APPS INTERVIEW QUESTIONS Search the archive...

Home » PL/SQL

WsB hiaU
tLKCOLLECT?HowandWhydoweneed Recent Posts
W hat is the role of a Functional Consultant in
ou
t?tsei Support and Implementation Project?
API approach to find On Hand Quantity of an
31 DECEMBER 2014 229 VIEWS 0 COMMENTS ARTICLE BY SHAILENDER THALLAM Item
W hat is the Difference betw een Available to
Migration for Oracle EBS Reserve & Available to Transact
W hat is BULK COLLECT? How and W hy do w e
Deliver Zero Error EBS migrations for the cost of your daily coffee
need to use it?
Frequently asked SQL Interview Questions
on EMP, DEPT table
Before understanding about BULK COLLECT, lets see how a PL/SQL code is executed. Oracle uses two Top PL/SQL Interview Questions w ith
engines to process PL/SQL code. All procedural code is handled by the PL/SQL engine while all SQL is Answ ers
W hy cant w e use SQLERRM and SQLCODE in
handled by the SQL engine. When ever there is a need to process an SQL statement, a context switch INSERT Statement?
happens between PL/SQL and SQL engines. FND_GLOBAL and FND_PROFILE: Import List
of System Global values
XML Publisher Interview Questions w ith
Answ ers
MD50, MD70 and MD120 Templates – Free
Dow nload
How to Schedule a concurrent program from
Backend
SQL Query to find Status of Inventory
Accounting Periods

STAY CONNECTED

Subscribe FREE updates on your Email | RSS

Enter your email address Subscribe

My Sponsers~!

Image a cursor with a SELECT statement which retrieves 1000 rows, in such scenario a context switch
will happen for 1000 times which consumes lot of CPU resources and leads to a performance issue.
BULK COLLECT is one of the way to solve this problem.

BULK COLLECT is one of the way of fetching bulk collection of data. With Oracle bulk collect, the
PL/SQL engine tells the SQL engine to collect many rows at once and place them into a collection.
During an Oracle bulk collect, the SQL engine retrieves all the rows and loads them into the collection
and switches back to the PL/SQL engine. When rows are retrieved using Oracle bulk collect, context
switch happens only once. The larger the number of rows you would like to collect with Oracle
bulk collect, the more performance improvement you will see using an Oracle bulk collect.

Example
In this example, lets use BULK COLLECT to fetch information of all the applications present in an EBS
instance.

Recent Posts from this Category


W hat is the role of a Functional Consultant in
Support and Implementation Project?
API approach to find On Hand Quantity of an
Item
W hat is the Difference betw een Available to
Reserve & Available to Transact
W hat is BULK COLLECT? How and W hy do w e

converted by W eb2PDFConvert.com
1 DECLARE need to use it?
2 TYPE xx_rec IS RECORD ( Frequently asked SQL Interview Questions
3 col1 fnd_application.APPLICATION_ID%TYPE, on EMP, DEPT table
4 col2 fnd_application.APPLICATION_SHORT_NAME%TYPE, Top PL/SQL Interview Questions w ith
5 col3 fnd_application.PRODUCT_CODE%TYPE, Answ ers
6 col4 fnd_application.BASEPATH%TYPE W hy cant w e use SQLERRM and SQLCODE in
7 ); --Record Type INSERT Statement?
8 FND_GLOBAL and FND_PROFILE: Import List
9 TYPE xx_tab IS TABLE OF xx_rec of System Global values
10 INDEX BY BINARY_INTEGER; --Table Type XML Publisher Interview Questions w ith
11 Answ ers
12 v_tab xx_tab; --This is a type of Collection MD50, MD70 and MD120 Templates - Free
13 Dow nload
14 --
15 --Cursor to list all applications in EBS instance
16 --
Tag Cloud Categories
17 CURSOR cur
18 IS back to back order Alerts (1)
19 SELECT application_id, application_short_name, product_code, basepath concurrent manager
C ost Manager AOL and SYSADMIN
20 FROM fnd_application; Diagnostics (29)
21 BEGIN dropshipment Errbuf AOL SQL Scripts
22 (20)
23
24
OPEN cur; FNDLOAD
FNDLOAD download
APIs (3)
Business Events
25 FETCH cur FNDLOAD upload
FND_DEVELOPER_MODE (2)
26 BULK COLLECT INTO v_tab; --BULK COLLECT usage
27 FND_DEVELOPER_MODE Custom PLL (1)
in routine HRMS (4)
28 CLOSE cur;
29
30 FOR l_index IN v_tab.FIRST .. v_tab.COUNT
fnd_request.submit_reques
How to port reports
Interview
Questions (5)
31 LOOP from one instance to Inventory (7)
32 DBMS_OUTPUT.put_line ( v_tab (l_index).col1 another HRMS Profile iRecruitment (1)
33 || ' ' Options iStore items
iStore (1)
34 || v_tab (l_index).col2 not available ldt files
35 || ' ' Line Status Flow MOAC OAF (4)
Move Transaction Oracle Apps Basics
36 || v_tab (l_index).col3 Manager O2C C ycle
37 || ' ' (16)
Oracle Logo Pending
38 || v_tab (l_index).col4 Resource Transactions Oracle Learning
39 ); personalization pl/sql Management (4)
40 END LOOP; procedures porting Oracle SQL (13)
41 END; reports profileoption Order Management
Profile options Reports (11)
Retcode Sales Order
Note: Remember that collections are held in memory, so doing a bulk collect from a large query could line Status Flow Ship Personalizations
C onfirm button greyed (4)
occupy most of your memory considerably leading to performance problem. Instead you can limit the Shipping Transactions PL/SQL (10)
rows returned using the LIMIT clause and move through the data processing smaller chunks. Below is form table suffix
WIP_C OST_TXN_INTERFAC E Profile Options (5)
an example of usage of LIMIT clause _A _AC N _ALL _AVN Purchasing (3)
_B _F _S _TL _V _VL Receivables (1)
OPEN cur; COPYRIGHT Reports (2)
Security (1)
FETCH cur
BULK COLLECT INTO v_tab LIMIT 100; --limiting BULK COLLECT to 100 records each per a context switch Shipping Execution
This w ork is licensed (2)
CLOSE cur; under a Creative Unix / Shell Scripts
Commons- (1)
NonCommercial 2.5 W IP Jobs (1)
License.
W orkflow s (12)
XMLP (9)
For Further Reading
1. Top PL/SQL Interview Questions with Answers
2. Useful Information about Workflow Background Process Concurrent Program
3. Script to close workflow notifications from backend
4. SQL Tuning or SQL Optimization

converted by W eb2PDFConvert.com
EBS Reporting
Webinar
Join Us for Our Oracle E-Business
Suite Reporting Tool Webinar. Oracle Apps DNA . Com
Like

170 people like Oracle Apps DNA . Com.

Facebook social plugin

WOW! Did you like this post? We'll send more interesting posts like What is BULK COLLECT? How
and Why do we need to use it? to you!
Enter your Email Address:
Enter your email address Subscribe Me!

0 Comments OracleAppsDNA  Login


Sort by Oldest Share ⤤ Favorite ★

Start the discussion…

✉ Subscribe d Add Disqus to your site  Privacy

Recent Posts Most Viewed Recent Comments


W hat is the role of a Functional Consultant
in Support and Implementation Project?
[Decrypting User Passw ord]How to find
passw ord of a User in Oracle Apps R12? -
Recent Comments
12,349 view s
API approach to find On Hand Quantity of Shashi Kiran One more reason for
an Item Top PL/SQL Interview Questions w ith backorder: In an Oracle W arehouse
Answ ers - 8,638 view s Management enabled organization,
W hat is the Difference betw een Available you must specify the staging subinventory
to Reserve & Available to Transact SQL Query to list Active Responsibilities of and locator w ithin the pick release criteria.
a Active User - 8,596 view s If you fail to specify...
W hat is BULK COLLECT? How and W hy do 11 Reasons for a Sales O rder to get
w e need to use it? Useful Information about W orkflow Back ordered! · 4 days ago
Background Process Concurrent Program -
Frequently asked SQL Interview Questions 8,126 view s
on EMP, DEPT table Shailender Thallam Sure Prashant, I
Order to Cash Technical Flow - 7,502 w ill make some effort to w rite on
Top PL/SQL Interview Questions w ith view s
Answ ers Interfaces and Conversions.
W hat is the role of a Functional Consultant in
How costing is performed on Inventory Support and Im plem entation Project? · 1 week
W hy cant w e use SQLERRM and SQLCODE Material Transactions - 7,331 view s ago
in INSERT Statement?
Information about Oracle APIs and How to
FND_GLOBAL and FND_PROFILE: Import find APIs of Oracle Modules? - 7,103 view s Shailender Thallam Hello Rambo,
List of System Global values Since the records are in 'Ready'
Purpose of Formula column, Summary status, I hope scheduling three
XML Publisher Interview Questions w ith column and Place Holder column in Oracle
Answ ers separate W orkflow Background processes
Reports - 6,666 view s - one each for timeout, deferred and stuck
MD50, MD70 and MD120 Templates – Free 11 Reasons for a Sales Order to get w ould solve the problem. Thanks,...
Dow nload Useful Inform ation about W ork flow Back ground
Backordered! - 5,020 view s Process Concurrent Program · 1 week ago
RICE, CEMLI Terminology in Oracle Apps -
4,931 view s Rambo hi, Thanks for sharing this
useful information. In my

converted by W eb2PDFConvert.com
environment w e alw ays have very high
ready count w hen I check from
w f_deferred_table_m (more than 70K
sometimes). W hat do you suggest in
this...
Useful Inform ation about W ork flow Back ground
Process Concurrent Program · 1 week ago

OracleAppsDNA

© 2014 OracleAppsDNA. Opinions expressed here are strictly those of the ow ner, Shailender
Thallam, and those of the commenters. Articles cannot be reproduced w ithout permission from the
author.

converted by W eb2PDFConvert.com

Vous aimerez peut-être aussi