Re: View vs. Statement Query Plan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: View vs. Statement Query Plan
Дата
Msg-id 19935.1023232559@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: View vs. Statement Query Plan  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: View vs. Statement Query Plan  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Tue, Jun 04, 2002 at 01:15:38AM -0400, Tom Lane wrote:
>> I don't doubt that this transformation is valid in some cases ... but
>> I do doubt that it is valid in all cases.  If someone can supply a
>> rigorous proof about when it is valid, I'd be willing to look into
>> doing the necessary programming.

> IIRC, union does an implicit DISTINCT (there's UNION ALL, right). So if what
> is being selected is anything other than a simple statement, it'll be very
> hard to prove equivalence (i guess this is what the iscachable is
> for).

Yeah, the UNION vs. UNION ALL difference is one of the things that would
need to be thought about.  I think it's more likely that the
transformation would work for UNION ALL than for UNION ... but I have
not had the time to try to work it out.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ctid & updates
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Lost Access To Table