On Sat, 13 Oct 2001 14:17:48 GMT, "Aasmund Midttun Godal" <[EMAIL PROTECTED]> 
wrote:
> On Fri, 12 Oct 2001 19:33:46 -0700 (PDT), Stephan Szabo 
><[EMAIL PROTECTED]> wrote:
> Well, then another question; will a function be only evaluated once inside a query 
>with the specific arguments?
> 
> i.e.will
> 
> my_table
> 
> foo|bar
> 1  |2
> 1  |3
> 2  |1
> 1  |3
> 
> 
> SELECT foo, bar FROM my_table WHERE func(foo, bar);
> 
> will func be evaluated 3 or 4 times ?
> 
I did some research on this issue. and I noticed the following:

the func was executed for each row i.e. 4 times.
However if I set iscachable it was only executed 3 times.
Yet it was executed again next time I called the select (I would have expected it to 
still be cached) is this intentional?

Or would it be a good idea to introduce a new option,

iscacheable (permanently cachable)
querycachable (cachable within a given query)

If there is some info on this issue please let me know!
> Aasmund Midttun Godal
> 
> [EMAIL PROTECTED] - http://www.godal.com/
> +47 40 45 20 46
Aasmund Midttun Godal

[EMAIL PROTECTED] - http://www.godal.com/
+47 40 45 20 46

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to