Re: Optimising queries involving unions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Optimising queries involving unions
Дата
Msg-id 3883.1117130556@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Optimising queries involving unions  (Sam Mason <sam@samason.me.uk>)
Список pgsql-performance
Sam Mason <sam@samason.me.uk> writes:
> Tom Lane wrote:
>> It'd be nice to fix this someday, but don't hold your breath ...

> Is it even worth me thinking about trying to figure out how to make
> the current code do this sort of thing?

Probably not :-(.  What we need is to integrate UNION (and the other
set-ops) into the normal querytree structure so that the planner can
consider alternative plans within its existing framework.  That requires
some fundamental changes in the Query structure --- in particular, we
have to get rid of the current situation that there is exactly one
targetlist per rangetable.  Decoupling targetlists and rangetables would
have some other benefits too (INSERT ... SELECT would get a lot cleaner)
but it's a wide-ranging change, and I think could only usefully be
tackled by someone who is already pretty familiar with the code.

            regards, tom lane

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

Предыдущее
От: "Brad Might"
Дата:
Сообщение: Specific query performance problem help requested - postgresql 7.4
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Specific query performance problem help requested - postgresql 7.4