Re: Postgresql 8.1.4 - performance issues for select on - Mailing list pgsql-performance

From Jeff Davis
Subject Re: Postgresql 8.1.4 - performance issues for select on
Date
Msg-id 1161207230.31645.266.camel@dogma.v10.wvs
Whole thread Raw
In response to Re: Postgresql 8.1.4 - performance issues for select on view using max  (Dimitri Fontaine <dim@dalibo.com>)
Responses Re: Postgresql 8.1.4 - performance issues for select on
Re: Postgresql 8.1.4 - performance issues for select on view using max
List pgsql-performance
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.

Regards,
    Jeff Davis


pgsql-performance by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Postgresql 8.1.4 - performance issues for select on view using max
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Postgresql 8.1.4 - performance issues for select on