Re: Invalid optimization of VOLATILE function in WHERE clause?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Invalid optimization of VOLATILE function in WHERE clause?
Дата
Msg-id 29422.1348072475@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Invalid optimization of VOLATILE function in WHERE clause?  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Invalid optimization of VOLATILE function in WHERE clause?  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Sep 19, 2012 at 10:30 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> To do what you want, I'd suggest wrapping the join into a sub-select
>> with an "OFFSET 0" clause, which will serve as an optimization fence
>> that prevents the random() call from being pushed down.

> You've repeatedly objected to complaints on pgsql-performance on the
> grounds that WITH is an optimization fence.  It seems awfully
> inconsistent to turn around and say, oh, sometimes it's not a fence
> after all.

Huh?  The join in question is not inside a WITH.  If it were, that
would work too, as noted by Merlin.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Invalid optimization of VOLATILE function in WHERE clause?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Invalid optimization of VOLATILE function in WHERE clause?