pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Hari Warrier <hbhaskaran@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Getting pg to use index on an inherited table (8.1.1)
Date: Tue, 17 Jan 2006 23:07:05 -0500
Message-ID: <4296.1137557225@sss.pgh.pa.us> (raw)
In-Reply-To: <43CDB628.3030007@gmail.com>
References: <43CDB628.3030007@gmail.com>

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



view thread (2+ messages)

Message-ID: <4296.1137557225@sss.pgh.pa.us>
Permalink:  ../4296.1137557225@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4296.1137557225@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, hbhaskaran@gmail.com
  Subject: Re: Getting pg to use index on an inherited table (8.1.1)
  In-Reply-To: <4296.1137557225@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox