Re: Postgresql 8.1.4 - performance issues for select on

От: Jim C. Nasby
Тема: Re: Postgresql 8.1.4 - performance issues for select on
Дата: ,
Msg-id: 20061018221046.GG85041@nasby.net
(см: обсуждение, исходный текст)
Ответ на: Re: Postgresql 8.1.4 - performance issues for select on  (Jeff Davis)
Ответы: Re: Postgresql 8.1.4 - performance issues for select on  (Jeff Davis)
Список: 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, )

On Wed, Oct 18, 2006 at 02:33:49PM -0700, Jeff Davis wrote:
> On Wed, 2006-10-18 at 23:19 +0200, Dimitri Fontaine wrote:
> > Le mercredi 18 octobre 2006 23:02, Ioana Danes a ??crit :
> > > I tried the partitioning scenario but I've got into
> > > the same problem. The max function is not using the
> > > indexes on the two partitioned tables...
> > >
> > > Any other thoughts?
> >
> > Did you make sure your test included table inheritance?
> > I'm not sure the planner benefits from constraint_exclusion without selecting
> > the empty parent table (instead of your own union based view).
> >
>
> constraint exclusion and inheritance won't help him.
>
> The problem is that he has two indexes, and he needs to find the max
> between both of them. PostgreSQL isn't smart enough to recognize that it
> can use two indexes, find the max in each one, and find the max of those
> two values.

Sorry, don't have the earlier part of this thread, but what about...

SELECT greatest(max(a), max(b)) ...

?
--
Jim Nasby                                            
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)


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

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