Postgresql sql query - selecting rows outside a join - Mailing 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