| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера