Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-04030: out of process memory using BULK COLLECT and FORALL

joelsJan 17 2007 — edited Jan 21 2007
Hi,

I am facing ORA-04030: out of process memory when trying to allocate 1973016 bytes (PLSnon-lib hp,DARWIN)
when I execute my package as below :

CREATE OR REPLACE PACKAGE BODY EOD_A.card_load
AS
PRAGMA SERIALLY_REUSABLE;
/******************************************************************************
NAME: CARD_LOAD
PURPOSE:

REVISIONS:
Ver Date Author Description
--------- ---------- --------------- ------------------------------------
1.0 17-Jan-2007 Yoel 1. Created this package.
******************************************************************************/
PROCEDURE updatecardsettlementdate
IS
TYPE tab_rowid is table of rowid
index by pls_integer;

card_rowid tab_rowid;
purse_rowid tab_rowid;

vclosingdate DATE;
BEGIN
SELECT MAX (closingsettlementdate)
INTO vclosingdate
FROM cut6.eod_settlementdate_info;

SELECT rowid
BULK COLLECT INTO card_rowid
from card_account
where card_settlement_date is not null;

FORALL indx in card_rowid.FIRST..card_rowid.LAST
UPDATE card_account
SET card_settlement_date = NULL
WHERE rowid = card_rowid(indx);

SELECT rowid
BULK COLLECT INTO purse_rowid
from purse_account
where card_settlement_date is not null;

FORALL indx in purse_rowid.FIRST..purse_rowid.LAST
UPDATE purse_account
SET card_settlement_date = NULL
WHERE rowid = purse_rowid(indx);

COMMIT;
END;
END card_load;
/

=======================================
Any suggestion how to tune this?
This procedure will process 10 million records from CARD_ACCOUNT and another 10 million from PURSE_ACCOUNT.
I am currently stucked with this.
If I use normal UPDATE, it doesn't give me this problem, but the processing time is about 30 minutes. I am trying to speed it up.

Thanks before for any suggestion.

Joel
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 18 2007
Added on Jan 17 2007
9 comments
800 views