replacing a subquery with an outer join?

Поиск
Список
Период
Сортировка
От Chris Curvey
Тема replacing a subquery with an outer join?
Дата
Msg-id CADfwSsA6GVdRDLMsa+dau95FE7GiJD-ZEwHxyszT5Bi-D4Ztww@mail.gmail.com
обсуждение исходный текст
Ответы Re: replacing a subquery with an outer join?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: replacing a subquery with an outer join?  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Список pgsql-general
in an earlier thread, the following query was submitted:

SELECT COUNT(*) FROM q
      WHERE NOT EXISTS (SELECT 1
                          FROM t AS t
                         WHERE t.mid = q.mid);

and as part of his answer, David Johnson responded


3. Also, you are using a correlated sub-query instead of a LEFT OUTER JOIN

This interests me.  How would you rewrite the correlated subquery above using the outer join? 

--
e-Mail is the equivalent of a postcard written in pencil.  This message may not have been sent by me, or intended for you.  It may have been read or even modified while in transit.  e-Mail disclaimers have the same force in law as a note passed in study hall.  If your corporate attorney says that you need an disclaimer in your signature, you need a new corporate attorney.

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

Предыдущее
От: Devrim GÜNDÜZ
Дата:
Сообщение: Re: PostgreSQL 8.4.8 RPM/SRPM for RHEL4
Следующее
От: Tom Lane
Дата:
Сообщение: Re: replacing a subquery with an outer join?