Received: from ns.krot.org (ns.krot.org [193.212.103.165]) by postgresql.org (8.11.3/8.11.4) with SMTP id f9DEwsr93580 for ; Sat, 13 Oct 2001 10:58:55 -0400 (EDT) (envelope-from aasmund@godal.com) Received: (qmail 2171 invoked by uid 67); 13 Oct 2001 14:57:06 -0000 Message-ID: <20011013145706.15118.qmail@ns.krot.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline MIME-Version: 1.0 From: "Aasmund Midttun Godal" To: pgsql-sql@postgresql.org Cc: sszabo@megazone23.bigpanda.com Subject: Re: Indexes Date: Sat, 13 Oct 2001 14:57:06 GMT X-Mailer: Googley-Moogley In-Reply-To: Aasmund Midttun Godal's messageof Sat, 13 Oct 2001 14:17:48 GMT References: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by postgresql.org id f9DFbTw00919 X-Archive-Number: 200110/185 X-Sequence-Number: 5140 On Sat, 13 Oct 2001 14:17:48 GMT, "Aasmund Midttun Godal" wrote: > On Fri, 12 Oct 2001 19:33:46 -0700 (PDT), Stephan Szabo 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