From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Ken Tanzer <ken.tanzer@gmail.com>
To: PG-General Mailing List <pgsql-general@postgresql.org>
Subject: Re: Immutable function WAY slower than Stable function?
Date: Mon, 6 Aug 2018 16:36:23 -0700
Message-ID: <03120a03-75d0-ad6c-691c-35ca7e7fccfa@aklaver.com> (raw)
In-Reply-To: <CAD3a31Vh6f5eLhK0kQL6b5mxr2Fc0qda1yW8YqTvDQRxcpg9jg@mail.gmail.com>
References: <CAD3a31Vh6f5eLhK0kQL6b5mxr2Fc0qda1yW8YqTvDQRxcpg9jg@mail.gmail.com>
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.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, ken.tanzer@gmail.com
Subject: Re: Immutable function WAY slower than Stable function?
In-Reply-To: <03120a03-75d0-ad6c-691c-35ca7e7fccfa@aklaver.com>
References: <CAD3a31Vh6f5eLhK0kQL6b5mxr2Fc0qda1yW8YqTvDQRxcpg9jg@mail.gmail.com> <03120a03-75d0-ad6c-691c-35ca7e7fccfa@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox