Re: How to find entries missing in 2nd table?

From: "Aaron Bono" <postgresql(at)aranya(dot)com>
To: "Exner, Peter" <Exner(at)his(dot)de>
Cc: "Richard Broersma Jr" <rabroersma(at)yahoo(dot)com>, "SQL Postgresql List" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: How to find entries missing in 2nd table?
Date: 2006-07-13 15:46:11
Message-ID: bf05e51c0607130846ufdb8a31n5757f67361447c2b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 7/12/06, Exner, Peter <Exner(at)his(dot)de> wrote:
>
> Hi,
>
> what about
>
> SELECT controller_id FROM control
> WHERE controller_id NOT IN
> (SELECT DISTINCT controller_id FROM datapack);

The DISTINCT is not necessary. I have heard with Oracle that DISTINCT is a
huge performance problem. Is that true on PostgreSQL also?

==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.com
==================================================================

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Broersma Jr 2006-07-13 16:16:51 Re: How to find entries missing in 2nd table?
Previous Message Jaime Casanova 2006-07-13 01:48:28 Re: Unexpected SQL error for UPDATE