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

Home -> Community -> Usenet -> c.d.o.server -> Re: DETERMINISTIC Function in Pkg

Re: DETERMINISTIC Function in Pkg

From: userjohn <userjohn_at_mailinator.com>
Date: Thu, 4 Oct 2007 23:31:19 -0400
Message-ID: <13gbc2vprri8fe5@corp.supernews.com>


So given a function like below and
many sessions calling it with SAME parameter -

Does Oracle just return the cached answer straight WITHOUT re-processing the SELECT ?

Reason for my asking:
 Basically I have many SEPARATE sessions inserting rows under an identical "transaction_id"
and I want to populated the "created_ts" column with IDENTICAL timestamp for all those insertions

FUNCTION get_hiredate(p_pk IN NUMBER) RETURN DATE DETERMINISTIC IS
l_return_date DATE;
BEGIN

     SELECT hiredate  INTO l_return_date
      FROM emp WHERE empno = p_pk;

RETURN l_return_date;
END; Received on Thu Oct 04 2007 - 22:31:19 CDT

Original text of this message

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