RE: Deterministic Functions: am I missing something?

2003-10-03 Thread Connor McDonald
I think Waleed's point is that he is yet to see an example where such an optimization has taken place. cheers connor --- Kevin Toepke <[EMAIL PROTECTED]> wrote: > One of the optimizations behind the DETERMINISTIC > keyword is that Oracle > caches previously computed values. If you pass the > sam

RE: Deterministic Functions: am I missing something?

2003-10-03 Thread Kevin Toepke
One of the optimizations behind the DETERMINISTIC keyword is that Oracle caches previously computed values. If you pass the same values into the function twice, the function body will execute at least once and at most twice. You can NOT count on the function body being executed for each call. This

Re: Deterministic Functions: am I missing something?

2003-10-03 Thread Connor McDonald
As far as I know, with all current releases of Oracle, determinism is purely for function based indexes. The deterministic keyword indicates that the function values when you created the index are still preserved when you query it. Thus the "first" execution was during index creation, and the "se

Deterministic Functions: am I missing something?

2003-10-02 Thread Khedr, Waleed
drop table test_det; create table test_det (c1 date); create or replace function f2 (p1 in number, p2 in number) return number deterministic is pragma autonomous_transaction; begin insert into test_det values (sysdate); commit; return(p1 * p2); end; / select f2 (1,3) from dual where f2 (1,3)