Re: explicit JOIN faster than implicit?

Поиск
Список
Период
Сортировка
От Filip Rembiałkowski
Тема Re: explicit JOIN faster than implicit?
Дата
Msg-id 92869e660908051617n4bc46829mec5cee9a9814269d@mail.gmail.com
обсуждение исходный текст
Ответ на Re: explicit JOIN faster than implicit?  (Eric Schwarzenbach <Eric.J.Schwarzenbach.C88@alumni.upenn.edu>)
Список pgsql-general
Hi,

2009/8/6 Eric Schwarzenbach <Eric.J.Schwarzenbach.C88@alumni.upenn.edu>
I tried playing with the join_collapse_limit setting. The implicit join
query was unaffected. The explicit join out-performed the implicit one
by 50% when the join_collapse_limit  was low enough, and took just as
long as the implicit one when the join_collapse_limit was high enough.

If I'm reading the documentation right, when the join_collapse_limit is
high enough, the planner is rewriting my explicit join syntax into the
implicit join syntax...with the effect of slowing it down!

I'm not especially concerned, as the performance is acceptable either
way, and I'll be getting the better performance anyway, but I'm just
wondering if this behavior is expected.


Probably it's not expected, and definitely it is not desired :)
It would be helpful if you post explain analyze of both queries, before and after VACUM ANALYZE of all used tables.
You can also try to increase statistics target for join columns. Indexes might help too.


--
Filip Rembiałkowski
JID,mailto:filip.rembialkowski@gmail.com
http://filip.rembialkowski.net/

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: explicit JOIN faster than implicit?
Следующее
От: Ivan Voras
Дата:
Сообщение: Re: PREPARE query with IN?