Re: explicit JOIN faster than implicit?

Поиск
Список
Период
Сортировка
От Eric Schwarzenbach
Тема Re: explicit JOIN faster than implicit?
Дата
Msg-id 4A7A043C.1070106@alumni.upenn.edu
обсуждение исходный текст
Ответ на explicit JOIN faster than implicit?  (Eric Schwarzenbach <subscriber@blackbrook.org>)
Ответы Re: explicit JOIN faster than implicit?
Список pgsql-general
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.


Eric

Eric Schwarzenbach wrote:
> I'm in the process taking a large SELECT statement which had been
> written using implicit join syntax (that is, just listing all the tables
> in the FROM clause, and listing join conditions in the WHERE clause) and
> rewriting it to use explicit JOIN syntax (they are all inner joins).
> This has sped up the query by 50%.
>
> This is using Postgres 8.3 on a database with GEQO turned off.
>
> Is this what would be expected? Does the query planner / optimizer
> generally do better with explicit JOIN syntax?
>
> Cheers,
>
> Eric
>
>


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

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