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: Creating an index on a view

Re: Creating an index on a view

From: Tony Andrews <andrewst_at_onetel.com>
Date: 13 Oct 2005 09:43:54 -0700
Message-ID: <1129221834.948456.235070@f14g2000cwb.googlegroups.com>


Paul wrote:
> I do not really understand what deterministic functions are or what
> they are used for as I have never used them before, maybe I should read
> up on them before posting again. But are you saying that Oracle will
> not actually bother to look up the data from the tables when the
> function is executed for the second time if I say it is a deterministic
> function? This seems wrong to me but then I admit I have not read up
> about these types of functions yet.
>
> If you could offer any information then I would appreciate it,
> otherwise I will RTFM!

A deterministic function is one that always returns the same output when given the same input; i.e. its result is purely a function of its inputs.

That rules out any function that selects from a table - unless that table is read-only!

The reason function-based indexes demand deterministic functions is because they store results of functions once and re-use them many times, assuming the same answer will always apply. If the function was not deterministic it would need to be evaluated every time - which is what happens WITHOUT an FBI anyway! Received on Thu Oct 13 2005 - 11:43:54 CDT

Original text of this message

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