Re: Getting pg to use index on an inherited table (8.1.1)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hari Warrier <hbhaskaran(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Getting pg to use index on an inherited table (8.1.1)
Date: 2006-01-18 04:07:05
Message-ID: 4296.1137557225@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hari Warrier <hbhaskaran(at)gmail(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Kirkwood 2006-01-18 05:51:58 Re: Suspending SELECTs
Previous Message Tom Lane 2006-01-18 04:02:21 Re: Suspending SELECTs