Re: Inheritance & Indexes - Mailing list pgsql-general

From Tom Lane
Subject Re: Inheritance & Indexes
Date
Msg-id 25979.1056551463@sss.pgh.pa.us
Whole thread Raw
In response to Re: Inheritance & Indexes  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: Inheritance & Indexes
List pgsql-general
Stephan Szabo <sszabo@megazone23.bigpanda.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 think the decision to use an inheritance tree for performance reasons
(as opposed to any logical necessity) was probably not a good one.
It'd be better to store all the data in one big table and use partial
indexes for faster access to subsets.

            regards, tom lane

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: [BUG?] table inhiritance violates primary key
Next
From: Bruce Momjian
Date:
Subject: Re: Determining table size