Re: Postgresql 8.1.4 - performance issues for select on

От: Tom Lane
Тема: Re: Postgresql 8.1.4 - performance issues for select on
Дата: ,
Msg-id: 2694.1161212717@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: Postgresql 8.1.4 - performance issues for select on  (Jeff Davis)
Ответы: Re: Postgresql 8.1.4 - performance issues for select on  (Ioana Danes)
Список: pgsql-performance

Скрыть дерево обсуждения

Postgresql 8.1.4 - performance issues for select on view using max  (Ioana Danes, )
 Re: Postgresql 8.1.4 - performance issues for select on view using max  (Dimitri Fontaine, )
  Re: Postgresql 8.1.4 - performance issues for select on view using max  (Ioana Danes, )
   Re: Postgresql 8.1.4 - performance issues for select on view using max  (Ioana Danes, )
    Re: Postgresql 8.1.4 - performance issues for select on view using max  (Dimitri Fontaine, )
     Re: Postgresql 8.1.4 - performance issues for select on  (Jeff Davis, )
      Re: Postgresql 8.1.4 - performance issues for select on  ("Jim C. Nasby", )
       Re: Postgresql 8.1.4 - performance issues for select on  (Jeff Davis, )
        Re: Postgresql 8.1.4 - performance issues for select on  ("Jim C. Nasby", )
         Re: Postgresql 8.1.4 - performance issues for select on  (Jeff Davis, )
         Re: Postgresql 8.1.4 - performance issues for select on  (Ioana Danes, )
        Re: Postgresql 8.1.4 - performance issues for select on  (Tom Lane, )
         Re: Postgresql 8.1.4 - performance issues for select on  (Ioana Danes, )
      Re: Postgresql 8.1.4 - performance issues for select on view using max  (Ioana Danes, )
 Re: Postgresql 8.1.4 - performance issues for select on view using max  ("Joshua Marsh", )
 Re: Postgresql 8.1.4 - performance issues for select on  (Jeff Davis, )

Jeff Davis <> writes:
> If PostgreSQL could sort the result of a union by merging the results of
> two index scans, I think the problem would be solved. Is there something
> preventing this, or is it just something that needs to be added to the
> planner?

It's something on the wish-list.  Personally I'd be inclined to try to
rewrite the query as a plain MAX() across rewritten per-table indexed
queries, rather than worry about mergesort or anything like that.
There wasn't any very good way to incorporate that idea when planagg.c
was first written, but now that the planner has an explicit notion of
"append relations" it might be relatively straightforward.

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: Jeff Davis
Дата:
Сообщение: Re: Postgresql 8.1.4 - performance issues for select on
От: Mark Kirkwood
Дата:
Сообщение: Re: measuring shared memory usage on Windows