Re: Immutable function WAY slower than Stable function?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Immutable function WAY slower than Stable function?
Date: 2018-08-06 23:36:23
Message-ID: 03120a03-75d0-ad6c-691c-35ca7e7fccfa@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 08/06/2018 03:49 PM, Ken Tanzer wrote:
> Hi.  I was recently troubleshooting a function, and realized it had
> incorrectly been declared as Immutable, when it should have been
> declared Stable.  When I changed it to Stable, the query I was running
> ran dramatically faster. Digging into this a little more, this is what I
> found:
>

>
> Happy to provide any additional relevant info, or for someone to point
> out what obvious thing I'm overlooking.  Thanks in advance!

What is the definition for target_date()?

>
> Ken
>
>
>
> --

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ken Tanzer 2018-08-06 23:44:25 Re: Immutable function WAY slower than Stable function?
Previous Message Ken Tanzer 2018-08-06 23:30:22 Re: Immutable function WAY slower than Stable function?