Postgresql sql query - selecting rows outside a join - Mailing list pgsql-general

From Graham Leggett
Subject Postgresql sql query - selecting rows outside a join
Date
Msg-id 3FCB773C.8070302@sharp.fm
Whole thread Raw
Responses Re: Postgresql sql query - selecting rows outside a join  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Re: Postgresql sql query - selecting rows outside a join  ("Arjen van der Meijden" <acmmailing@vulcanus.its.tudelft.nl>)
Re: Postgresql sql query - selecting rows outside a join  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Re: Postgresql sql query - selecting rows outside a join  (Adam Ruth <aruth@intercation.com>)
List pgsql-general
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
--




pgsql-general by date:

Previous
From: Gianni Mariani
Date:
Subject: Re: UNICODE problem on 7.4 with COPY
Next
From: Pavel Stehule
Date:
Subject: Re: Postgresql sql query - selecting rows outside a join