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)
Список pgsql-performance
Дерево обсуждения
Optimising queries involving unions  (Sam Mason, )
 Re: Optimising queries involving unions  (Tom Lane, )
  Re: Optimising queries involving unions  (Sam Mason, )
   Re: Optimising queries involving unions  (Tom Lane, )
 Re: Optimising queries involving unions  ("Marc Mamin", )
Sam Mason <> 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 по дате отправления:

Предыдущее
От: Dawid Kuroczko
Дата:
Сообщение: Re: slow queries, possibly disk io
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: slow queries, possibly disk io