Re: Patch to support SEMI and ANTI join removal

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Patch to support SEMI and ANTI join removal
Дата
Msg-id 1976.1411915316@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Patch to support SEMI and ANTI join removal  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: Patch to support SEMI and ANTI join removal  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> Please correct anything that sounds wrong here, but my understanding is
> that we'll always plan a query right before we execute it, with the
> exception of PREPARE statements where PostgreSQL will cache the query plan
> when the prepare statement is first executed.

If this optimization only works in that scenario, it's dead in the water,
because that assumption is unsupportable.  The planner does not in general
use the same query snapshot as the executor, so even in an immediate-
execution workflow there could have been data changes (caused by other
transactions) between planning and execution.

Why do you need such an assumption?
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Proper query implementation for Postgresql driver
Следующее
От: Shay Rojansky
Дата:
Сообщение: Re: Proper query implementation for Postgresql driver