Re: Poor performance using CTE

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Poor performance using CTE
Дата
Msg-id CAHyXU0z4oUss50vhH_wGZ-HERQe9wCMSf1nMTGNddXeCoKvVVA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Poor performance using CTE  (Claudio Freire <klaussfreire@gmail.com>)
Ответы Re: Poor performance using CTE
Список pgsql-performance
On Tue, Nov 20, 2012 at 9:10 AM, Claudio Freire <klaussfreire@gmail.com> wrote:
> On Tue, Nov 20, 2012 at 12:04 PM, Merlin Moncure <mmoncure@gmail.com> wrote:
>> The problem here is very clear.  Oracle is optimizing through the CTE.
>>  PostgreSQL does not do this by design -- CTE's are used as a forced
>> materialization step.
>
> While I love that design (it lets me solve lots of problems for huge
> queries), wouldn't pushing constraints into the CTE be a rather safe
> optimization?

sure, or rewrite query as classic join.

merlin


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

Предыдущее
От: Claudio Freire
Дата:
Сообщение: Re: Poor performance using CTE
Следующее
От: Claudio Freire
Дата:
Сообщение: Re: Poor performance using CTE