Home » RDBMS Server » Server Administration » Problem in bulk collect (Oracle 10g)
Problem in bulk collect [message #452493] Thu, 22 April 2010 06:55 Go to next message
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 #452497 is a reply to message #452493] Thu, 22 April 2010 07:09 Go to previous messageGo to next message
kumarsanjeeva
Messages: 16
Registered: April 2010
Location: Delhi
Junior Member

This is something related with admin job.
1. if SORT_AREA_SIZE parameter is large, you can reduce this.
2. Check user memory limit and swap space (Virtual memory
in Windows).
3. if it is on unix platform, increase ulimit.
4. check if parallel query is enabled
Re: Problem in bulk collect [message #452509 is a reply to message #452493] Thu, 22 April 2010 07:47 Go to previous messageGo to next message
Michel Cadot
Messages: 68665
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ORA-04030: out of process memory when trying to allocate %s bytes (%s,%s)
 *Cause:  Operating system process private memory has been exhausted
 *Action:

It is an OS limit.
Execute "ulimit" for oracle user and enlarge it.

Regards
Michel
Re: Problem in bulk collect [message #452521 is a reply to message #452509] Thu, 22 April 2010 08:01 Go to previous message
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.
Previous Topic: ORA-01034
Next Topic: DeInstall Oracle 11g
Goto Forum:
  


Current Time: Sat Jun 29 00:28:05 CDT 2024