Problem in bulk collect [message #452493] |
Thu, 22 April 2010 06:55  |
Mohsin_Tm
Messages: 15 Registered: December 2009 Location: Pune
|
Junior Member |
|
|
Hi Guys,
I am trying to run query using bulk collect but getting error
My query is fetching around 20 Lac. or=f records and will be increased by time.
"ORA-04030: out of process memory when trying to allocate 16396 bytes (koh-kghu call ,pmuccst: adt/record) "
My code:
Declare
Type Ty_tbl is table of Ty_rec
Index by Binary_integer ;
Blk_Ty Ty_Tbl;
Cnt number :=0;
t OMS_REQUIRED_TABLE.PROBLEM%type;
Begin
SELECT /* +Parallel(d,4) */ c.ORDER_NODE_INDEX,c.ORDER_SEQ_ID,c.ORDER_NODE_ID,c.PARENT_NODE_INDEX,c.NODE_VALUE_TEXT,
c.NODE_VALUE_NUM,d.NEW_TABLE_NAME,d.NEW_COLUMN_NAME, d.NEW_COLUMN_TYPE, d.NEW_COLUMN_SIZE,d.ATTRIBUTE_TYPE,
c.DATA_DICTIONARY_ID,d.PROBLEM
Bulk collect into Blk_Ty
FROM
OM_ORDER_INSTANCE c INNER JOIN OMS_REQUIRED_TABLE d on c.ORDER_NODE_ID=d.ORDER_NODE_ID
WHERE c.ORDER_NODE_TYPE NOT IN ('G','T') ;
End;
Please suggest some solution.
|
|
|
|
|
Re: Problem in bulk collect [message #452521 is a reply to message #452509] |
Thu, 22 April 2010 08:01  |
tahpush
Messages: 961 Registered: August 2006 Location: Stockholm/Sweden
|
Senior Member |

|
|
Change your strategy. Your resultset is too big to fit memory.
If possible try to fetch the data with a explicit cursor and use bulk collect with the limit clause.
|
|
|