Re: Does PG cache results of an aggregate function, (and results of non-volatile functions)?

From: 纪晓曦 <sheepjxx(at)gmail(dot)com>
To: Allan Kamau <kamauallan(at)gmail(dot)com>
Cc: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Does PG cache results of an aggregate function, (and results of non-volatile functions)?
Date: 2009-09-19 13:06:58
Message-ID: 37a11ce00909190606vd4200daw3ea97431f866e52e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Well I don't think the result would keep if you run a "hot" test. However,
in one SELECT clause, maybe it can be optimised .

2009/9/3 Allan Kamau <kamauallan(at)gmail(dot)com>

> Hi,
> I do have a query which make use of the results of an aggregate
> function (for example bit_or) several times in the output column list
> of the SELECT clause, does PostgreSQL simply execute the aggregate
> function only once and provide the output to the other calls to the
> same aggregate function.
> How about the case of non volatile functions? Do they get executed as
> many times as they occur in the select clause?
>
> Allan.
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2009-09-19 15:00:56 Re: haversine formula with postgreSQL
Previous Message chris_watcher 2009-09-19 08:44:16 Re: Regarding initdb & pg_ctl