is your function stable/immutable, and if so is it decorated as such.
No, itŽs volatile.
Well, that's your problem. The planner won't push down the IN clause
past the volatile function for fear of changing the query's side-effects.
I'd question whether it's sane to have a view with volatile
Jan Strube writes:
>> is your function stable/immutable, and if so is it decorated as such.
> No, it´s volatile.
Well, that's your problem. The planner won't push down the IN clause
past the volatile function for fear of changing the query's side-effects.
I'd question whether it's sane to have
is your function stable/immutable, and if so is it decorated as such.
merlin
No, it´s volatile.
Jan
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Thu, Feb 14, 2013 at 7:23 AM, Jan Strube wrote:
> Hi,
>
> I have the following query which runs reasonably fast under PostgreSQL
> 9.1.8:
>
> SELECT
> b."ISIN",
> CASE
> WHEN b."COMMENT" IS NOT NULL THEN b."COMMENT"
> WHEN cc."ISIN" IS NOT NULL THEN cc.comment
> ELSE get_comment(b."ISIN")
> END
Hi,
I have the following query which runs reasonably fast under PostgreSQL
9.1.8:
SELECT
b."ISIN",
CASE
WHEN b."COMMENT" IS NOT NULL THEN b."COMMENT"
WHEN cc."ISIN" IS NOT NULL THEN cc.comment
ELSE get_comment(b."ISIN")
END AS "COMMENT"
FROM dtng."Z_BASE" b
LEFT JOIN dtng.cached_comments cc on