Re: How to find entries missing in 2nd table? - Mailing list pgsql-sql

From Scott Marlowe
Subject Re: How to find entries missing in 2nd table?
Date
Msg-id 1152727998.14241.24.camel@state.g2switchworks.com
Whole thread Raw
In response to Re: How to find entries missing in 2nd table?  ("Exner, Peter" <Exner@his.de>)
List pgsql-sql
On Wed, 2006-07-12 at 03:06, Exner, Peter wrote:
> Hi, 
> 
> what about
> 
> SELECT controller_id FROM control
> WHERE controller_id NOT IN
> (SELECT DISTINCT controller_id FROM datapack);

That one works too, but it's generally not as fast as the left join / is
null query on large tables.  Give the two a try on a test set and you
should see the speed difference.


pgsql-sql by date:

Previous
From: aurora
Date:
Subject: Re: Unexpected SQL error for UPDATE
Next
From: "Aaron Bono"
Date:
Subject: Re: Avoiding RI failure with INSERT ... SELECT FROM