Re: left join performance problem

Поиск
Список
Период
Сортировка
От pginfo
Тема Re: left join performance problem
Дата
Msg-id 3EE8061B.1FAED8AD@t1.unisoftbg.com
обсуждение исходный текст
Ответ на left join performance problem  (pginfo <pginfo@t1.unisoftbg.com>)
Ответы Re: left join performance problem  ("Jim C. Nasby" <jim@nasby.net>)
Список pgsql-performance
Many thanks Tom,
the doc do not contain solution for this case, but the idea to
change the join order was excelent and all is working fine at the moment.

regards,
ivan.

Tom Lane wrote:

pginfo <pginfo@t1.unisoftbg.com> writes:
> I have a big problem with pg left join performance.

I think the problem is that the LEFT JOIN clause is forcing the
planner to join A_SKLAD to A_MESKLAD before anything else, whereas
a good plan would do some of the other joins first to eliminate
as many rows as possible.  You will need to revise the query to
let the LEFT JOIN happen later.  For discussion see
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=explicit-joins.html

                        regards, tom lane

 

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: left join performance problem
Следующее
От: Andreas Kostyrka
Дата:
Сообщение: Re: Table Relationships