Search Postgresql Archives

Re: Static functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 4, 2008 at 6:06 PM, Gregory Stark <stark@xxxxxxxxxxxxxxxx> wrote:
"Gurjeet Singh" <singh.gurjeet@xxxxxxxxx> writes:

> On Sat, Oct 4, 2008 at 8:49 AM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
>
>> "Gurjeet Singh" <singh.gurjeet@xxxxxxxxx> writes:
>> > Shouldn't PG make all efforts to not execute something when the result is
>> > already known?
>>
>> Not if said effort would cost more than is saved, which would be by far
>> the most likely result if we tried to cache all function results.
>>
>
> Sorry Tom, I confused STABLE  with IMMUTABLE; my bad.

No, this is equally untrue for immutable.

Yup... I realized that after a bit of more testing after the mail... Immutable functions are single-call-per-command only of you are passing constants-only as parameters; if we have an _expression_ involving columns, then they will be called for every row.

Best regards,
--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB      http://www.enterprisedb.com

Mail sent from my BlackLaptop device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux