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: Deterministic Functions: am I missing something?

RE: Deterministic Functions: am I missing something?

From: Kevin Toepke <ktoepke_at_rlcarriers.com>
Date: Fri, 03 Oct 2003 07:04:41 -0800
Message-ID: <F001.005D1F4F.20031003070441@fatcity.com>


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 is actually a cool feature. Consider a situation where you are repeatedly performing time-consuming computations/lookups. If Oracle caches previously computed values for you, this can lead to significant performance benefits!

Kevin T

-----Original Message-----
Sent: Friday, October 03, 2003 9:51 AM
To: Multiple recipients of list ORACLE-L

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 "second" execution is during subsequent queries during which the function does not need to be executed because it is deterministic.

(Lame eh?)


Connor McDonald
web: http://www.oracledba.co.uk
web: http://www.oaktable.net
email: connor_mcdonald_at_yahoo.com

"GIVE a man a fish and he will eat for a day. But TEACH him how to fish, and...he will sit in a boat and drink beer all day"



Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: =?iso-8859-1?q?Connor=20McDonald?=
  INET: hamcdc_at_yahoo.co.uk

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Kevin Toepke
  INET: ktoepke_at_rlcarriers.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Oct 03 2003 - 10:04:41 CDT

Original text of this message

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