Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Session PGA memory max exceeded 2 GB and crashes.

Re: Session PGA memory max exceeded 2 GB and crashes.

From: Norman Dunbar <norman.dunbar_at_environment-agency.gov.uk>
Date: Thu, 21 Dec 2006 09:55:25 +0000
Message-Id: <s58a5a29.031@environment-agency.gov.uk>

Morning Jonathan,

>> In general you can expect the function to be called
>> twice if you use it to identify an indexed access path
>> (as in your later experiment, perhaps).
>> id > function(const)

You are correct. I didn't do an explain plan but now that I have it was indeed using an index. The function was called once. I added a full hint and the function was indeed called for each row in the table. It *is* looking more and more likely that we have a memory leak in the PJ/SQL - I shall have to delve deeper.

>> However, for a tablescan - which this seems to be -
>> the function is called once per row. (Until 10g where
>> deterministic functions nearly work).

The original query does indeed use a full scan. I should have made that clear in my original post.

>> I would guess that you have a memory leak in the pj/sql.
:o(

>> Change the code to:
>> WHERE MONTHS_BETWEEN(SYSDATE, LAST_USED_DATTIM) >
>> (select Pk_Utils.fnc_get_sys_par ( 'HOUSE_AUDIT') from dual)
>> and I think scalar subquery caching will probably kick in -
>> so you should only call the function once, and bypass any
>> leakage problem. You'll also save a lot of CPU too, probably.

I have tested this and it does one call to the function. I shall see if I can get a test in the system and see how it goes.

Thanks very much.

Cheers,
Norman.

Norman Dunbar.
Contract Oracle DBA.
Rivers House, Leeds.

Internal : 7 28 2051
External : 0113 231 2051

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.

We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Dec 21 2006 - 03:55:25 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US