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

2009-09-19 Thread 纪晓曦
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 > 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

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

2009-09-18 Thread Tom Lane
Merlin Moncure writes: > On Thu, Sep 3, 2009 at 3:44 AM, Allan Kamau wrote: >> 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

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

2009-09-18 Thread Merlin Moncure
On Thu, Sep 3, 2009 at 3:44 AM, Allan Kamau wrote: > 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 t

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

2009-09-17 Thread Bruce Momjian
Allan Kamau wrote: > 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 t

[GENERAL] Does PG cache results of an aggregate function, (and results of non-volatile functions)?

2009-09-03 Thread Allan Kamau
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. H