Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Thu, 13 Jul 2006 10:46:11 -0500
  • Message-id: <bf05e51c0607130846ufdb8a31n5757f67361447c2b(at)mail(dot)gmail(dot)com>

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
==================================================================

Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group