Re: Function reloading in SGA

  • From: Jay Hostetter <hostetter.jay@xxxxxxxxx>
  • To: David Fitzjarrell <oratune@xxxxxxxxx>
  • Date: Tue, 25 May 2010 16:00:43 -0400

If that were the case, wouldn't the number of loads to be very close
to the number of executions?   It is not a recently pinned object.

Jay

SQL> run
 1  select owner,name,type,loads,executions,kept from v$db_object_cache

 2* where name='GET_NEXT_SEQUENCE'


OWNER      NAME                 TYPE                  LOADS EXECUTIONS KEP
---------- -------------------- ---------------- ---------- ---------- ---
FIRM       GET_NEXT_SEQUENCE    NON-EXISTENT             35          0 NO
MIS        GET_NEXT_SEQUENCE    FUNCTION                385    1396646 YES
PUBLIC     GET_NEXT_SEQUENCE    SYNONYM                  35          0 NO

On Tue, May 25, 2010 at 3:13 PM, David Fitzjarrell <oratune@xxxxxxxxx>wrote:

>   If I remember correctly PRAGMA AUTONOMOUS_TRANSACTION will cause a
> reload of the function every time it is called since each call is an
> independent operation.
>
> David Fitzjarrell
>
>
>
>  ------------------------------
> *From:* Jay Hostetter <hostetter.jay@xxxxxxxxx>
> *To:* David Fitzjarrell <oratune@xxxxxxxxx>; oracle-l@xxxxxxxxxxxxx
> *Sent:* Tue, May 25, 2010 3:08:12 PM
> *Subject:* Re: Function reloading in SGA
>
> Here it is:
>
> create or replace function    get_next_sequence
> ( arg_facility  IN varchar2,
>   arg_seq_name  IN varchar2,
>   arg_This_Id  IN number,
>   arg_julianday IN number  )
> RETURN NUMBER IS
>   PRAGMA AUTONOMOUS_TRANSACTION;
>   ret_next_seq            NUMBER;
>   v_last_id              NUMBER;
>   v_julian                NUMBER;
>   V_REPDATE              DATE;
>
> BEGIN
>

Other related posts: