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!

Deterministic Function

DKhatiyanAug 26 2015 — edited Aug 26 2015

Hi All,

Was Trying to create a deterministic function, as per my understanding determinisktic function is one which will return the same value for the same parameter. Now if we explicitly declare a function as deterministic then -

1. what actually oracle does, it store the value some where in buffer??? if yes, exactly from where it return the value.

2. Only sole purpose of deterministic is to enhance the performance.

3. To test the same created a explicit deterministic function(function Fn_Det(VN_NUm in number) return timestamp deterministic is ) whose behavior in actual is not deterministic, but how oracle is able to return different values in this case even we have explicitly declared it as deterministic.


create or replace function Fn_Det(VN_NUm in number) return timestamp deterministic is

  Result Timestamp;

begin 

  Result:=cast(sysdate-VN_NUm as timestamp);

   return(Result);

end Fn_Det;

Thanks in advance for your responses..

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 23 2015
Added on Aug 26 2015
5 comments
1,183 views