Re: View vs. Statement Query Plan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: View vs. Statement Query Plan
Дата
Msg-id 14790.1023167738@sss.pgh.pa.us
обсуждение исходный текст
Ответ на View vs. Statement Query Plan  (Curt Sampson <cjs@cynic.net>)
Ответы Re: View vs. Statement Query Plan  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Curt Sampson <cjs@cynic.net> writes:
> But for some reason this view doesn't use the indices that an
> equivalant query uses:

You're essentially supposing that

    select * from (select * from a union select * from b) where foo;

may be transformed into

    (select * from a where foo) union (select * from b where foo);

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.

            regards, tom lane

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

Предыдущее
От: Oliver Jones
Дата:
Сообщение: Updates failing yet saying they succeeded.
Следующее
От: Gregory Seidman
Дата:
Сообщение: Re: Updates failing yet saying they succeeded.