Re: Query becomes slow when written as view - Mailing list pgsql-general

From Tom Lane
Subject Re: Query becomes slow when written as view
Date
Msg-id 21225.1360855751@sss.pgh.pa.us
Whole thread Raw
In response to Re: Query becomes slow when written as view  (Jan Strube <js@deriva.de>)
Responses Re: Query becomes slow when written as view
List pgsql-general
Jan Strube <js@deriva.de> 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 a view with volatile functions in
it at all.  It certainly won't act much like the normal understanding of
a view ...

            regards, tom lane

pgsql-general by date:

Previous
From: "James B. Byrne"
Date:
Subject: Re: Howto see template objects in PGAdmin3
Next
From: Jeff Janes
Date:
Subject: Re: Runtime variations during day