Re: Getting pg to use index on an inherited table (8.1.1) - Mailing list pgsql-performance

From Tom Lane
Subject Re: Getting pg to use index on an inherited table (8.1.1)
Date
Msg-id 4296.1137557225@sss.pgh.pa.us
Whole thread Raw
In response to Getting pg to use index on an inherited table (8.1.1)  (Hari Warrier <hbhaskaran@gmail.com>)
List pgsql-performance
Hari Warrier <hbhaskaran@gmail.com> writes:
> A query on foobar2 (child table) uses the index, whereas the same query
> via foobar (parent) doesn't.

A query just on foobar should be able to use the index AFAIR.  The
problem here is that you have a join, and we are not very good about
situations involving joins against inheritance sets (nor joins against
UNION ALL subqueries, which is really about the same thing).

I'm hoping to get a chance to look into improving this during the 8.2
development cycle.

            regards, tom lane

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Suspending SELECTs
Next
From: "Ahmad Fajar"
Date:
Subject: Re: Multiple Order By Criteria