Re: JOINS and non use of indexes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: JOINS and non use of indexes
Дата
Msg-id 21034.1018279317@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: JOINS and non use of indexes  ("Ian Cass" <ian.cass@mblox.com>)
Список pgsql-sql
"Ian Cass" <ian.cass@mblox.com> writes:
>> The planner isn't smart about
>> indexscan-based joins for inheritance trees.  This could possibly be
>> improved with some work, but I haven't thought about the details.

> Is there any way I could 'educate' it by using more explicit sql, or do I
> have to abandon the idea of using inheritance altogether?

You'd have to spell out the join for each member of the inheritance
tree:
SELECT ... FROM outside, inside_1 WHERE ...UNION ALLSELECT ... FROM outside, inside_2 WHERE ...UNION ALLSELECT ... FROM
outside,inside_3 WHERE ...
 

which is just about as bad as not using inheritance :-(
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Ian Cass"
Дата:
Сообщение: Re: JOINS and non use of indexes
Следующее
От: Søren Vainio
Дата:
Сообщение: Scadinavian characters in regular expressions