Re: Inheritance & Indexes

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alan Williams <alan_williams(at)affymetrix(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Inheritance & Indexes
Date: 2003-06-25 14:48:11
Message-ID: 20030625074029.Q26076-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Wed, 25 Jun 2003, Tom Lane wrote:

> Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> writes:
> > I *think* 7.4 may be smarter about
> > implying these conditions as well.
>
> Not really. AFAIR the Append-style plan is the only thing you can get
> out of the planner for inheritance trees. This works well enough for
> restriction clauses like "id = constant" (since those get pushed down to
> the member tables, much as with UNION ALL), but it just isn't gonna be
> efficient for join situations. And I can't see any realistic way for
> the planner to realize that only some pairs of child tables need be
> joined.

I was actually thinking of the table1.col=table2.col and table1.col=42
implying table2.col=42 when I wrote the above because he was also
wondering why it wasn't using index scans on the table2 tree. Which now
that I have access to my 7.4 box again, it does appear to.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2003-06-25 14:58:21 Re: [GENERAL] capturing and storing query statement with
Previous Message Daniel E. Fisher 2003-06-25 14:46:11