From: Aasmund Midttun Godal <aasmund@godal.com>
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone23.bigpanda.com
Subject: Re: Indexes
Date: Sat, 13 Oct 2001 14:57:06 GMT
Message-ID: <20011013145706.15118.qmail@ns.krot.org> (raw)
References: <Pine.BSF.4.21.0110121932250.99565-100000@megazone23.bigpanda.com>
On Sat, 13 Oct 2001 14:17:48 GMT, "Aasmund Midttun Godal" <postgresql@envisity.com> wrote:
> On Fri, 12 Oct 2001 19:33:46 -0700 (PDT), Stephan Szabo <sszabo@megazone23.bigpanda.com> 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
>
> aasmund@godal.com - http://www.godal.com/
> +47 40 45 20 46
Aasmund Midttun Godal
aasmund@godal.com - http://www.godal.com/
+47 40 45 20 46
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: aasmund@godal.com, sszabo@megazone23.bigpanda.com
Subject: Re: Indexes
In-Reply-To: <20011013145706.15118.qmail@ns.krot.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox