Re: Query becomes slow when written as view

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan Strube <js(at)deriva(dot)de>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Query becomes slow when written as view
Date: 2013-02-14 15:29:11
Message-ID: 21225.1360855751@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jan Strube <js(at)deriva(dot)de> writes:
>> is your function stable/immutable, and if so is it decorated as such.

> No, its 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2013-02-14 16:45:53 Re: BUG #7493: Postmaster messages unreadable in a Windows console
Previous Message James B. Byrne 2013-02-14 15:06:59 Re: Howto see template objects in PGAdmin3