Outer join with where conditions

Поиск
Список
Период
Сортировка
От Michał Otroszczenko
Тема Outer join with where conditions
Дата
Msg-id 446305c00511140545p1fbfa57bl@mail.gmail.com
обсуждение исходный текст
Ответы Re: Outer join with where conditions  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Re: Outer join with where conditions  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-general
Hello,

I wonder If I could move additional join condition from ON part of
query to where part.

For example instead of:

SELECT *  FROM
    booking_load AS bload
    LEFT OUTER JOIN dict_load_type_tsl AS load_tsl ON (
                    load_tsl.dict_load_type_id = bload.dict_load_type_id
                    AND load_tsl.dict_language_id = 'EN' ))

Could I write:

SELECT *  FROM
    booking_load AS bload
    LEFT OUTER JOIN dict_load_type_tsl AS load_tsl USING (dict_load_type_id)
WHERE
     load_tsl.dict_language_id = 'EN'

I thought that second query could be more 'optimizable', but gave no results.
Where is the problem ?

Best regards,
Michal

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

Предыдущее
От: Hugo
Дата:
Сообщение: odbc and psql 8.1.0
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Outer join with where conditions