Re: [GENERAL] Negating the list of selected rows of a join

Поиск
Список
Период
Сортировка
От Ulf Mehlig
Тема Re: [GENERAL] Negating the list of selected rows of a join
Дата
Msg-id 199903140926.KAA02084@pandora3.uni-bremen.de
обсуждение исходный текст
Ответ на Negating the list of selected rows of a join  ("Manuel Lemos" <mlemos@acm.org>)
Список pgsql-general
Clark Evans <clark.evans@manhattanproject.com>/Ulf Mehlig
<umehlig@pandora3.uni-bremen.de> wrote:

 > >  > Hope this will do the trick.
 > >
 > > Maybe not -- doesn't that mean, that the query won't return a
 > > single row in case there is *any* pair of equal names in both
 > > tables?!
 >
 > No.  It's a correlated sub-query.  It's actually much more efficient
 > with large tables than the other approach (which has to put
 > the entire result set of table_b on the heap before it can
 > process table_a).  Your approach is, however, much better (by a
 > large factor) if table_a is very large and table_b is very small,
 > since you don't have to hit the index for table_b on every
 > row of table_a...

Yes, it *will* do the trick!! Sorry, Clark, I misinterpreted your
sub-query ... have to read more carefully ...

Thanks for your correction!
Ulf

--
======================================================================
Ulf Mehlig    <umehlig@zmt.uni-bremen.de>
              Center for Tropical Marine Ecology/ZMT, Bremen, Germany
----------------------------------------------------------------------

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

Предыдущее
От: Clark Evans
Дата:
Сообщение: Re: [GENERAL] Negating the list of selected rows of a join
Следующее
От: Henk Jan Barendregt
Дата:
Сообщение: Error building pg 6.4 on RH Linux