Re: Postgresql sql query - selecting rows outside a join

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Postgresql sql query - selecting rows outside a join
Дата
Msg-id Pine.LNX.4.44.0312011831590.31748-100000@kix.fsv.cvut.cz
обсуждение исходный текст
Ответ на Postgresql sql query - selecting rows outside a join  (Graham Leggett <minfrin@sharp.fm>)
Список pgsql-general
Hello

If you can, use PostgreSQL version 7.4. There is some optimalisation for
this questions. You can change your query from select .. IN (select) to
select .. exists (select). More about it you can find in FAQ.

regards
Pavel

On Mon, 1 Dec 2003, Graham Leggett wrote:

> Hi all,
>
> I am trying to do a query that returns  all rows that are _not_ part of
> a join, and so far I cannot seem to find a query that doesn't take 30
> minutes or more to run.
>
> The basic query is "select * from tableA where tableA_id NOT IN (select
> tableA_id from tableB)".
>
> Is there a more efficient way of doing this?
>
> Regards,
> Graham
> --
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>


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

Предыдущее
От: "Arjen van der Meijden"
Дата:
Сообщение: Re: Postgresql sql query - selecting rows outside a join
Следующее
От: "Toby Doig"
Дата:
Сообщение: Re: Postgresql sql query - selecting rows outside a join