Re: How to find entries missing in 2nd table?
| От | Nate Teller |
|---|---|
| Тема | Re: How to find entries missing in 2nd table? |
| Дата | |
| Msg-id | JOEPKPKCCCBGEIEIKIIPCEHCDAAA.nate.teller@mindspring.com обсуждение исходный текст |
| Ответ на | Re: How to find entries missing in 2nd table? ("Aaron Bono" <postgresql@aranya.com>) |
| Список | pgsql-sql |
I have received good performance with the following:
select c.controller
from control c
left outer join datapack d on d.controller_id = c.controller_id
where d.controller_id is null
Nate Teller
-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Aaron Bono
Sent: Thursday, July 13, 2006 11:46 AM
To: Exner, Peter
Cc: Richard Broersma Jr; SQL Postgresql List
Subject: Re: [SQL] How to find entries missing in 2nd table?
On 7/12/06, Exner, Peter <Exner@his.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
==================================================================
В списке pgsql-sql по дате отправления: