Re: Inheritance & Indexes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Inheritance & Indexes
Дата
Msg-id 25979.1056551463@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Inheritance & Indexes  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Ответы Re: Inheritance & Indexes  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список 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 по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: [BUG?] table inhiritance violates primary key
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Determining table size