X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id A83B39FB391 for ; Thu, 13 Jul 2006 13:16:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 16404-08 for ; Thu, 13 Jul 2006 13:16:53 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web31809.mail.mud.yahoo.com (web31809.mail.mud.yahoo.com [68.142.207.72]) by postgresql.org (Postfix) with SMTP id D83BD9FB2B0 for ; Thu, 13 Jul 2006 13:16:52 -0300 (ADT) Received: (qmail 39569 invoked by uid 60001); 13 Jul 2006 16:16:51 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Kfpjql589CDZRvxjhlSYg59OgGFbbe6X7hvz7W2Csd6VqMcg1qPjRtGHFtpGEUZgAyc+tibW634466tkKQd15Q3HQpxxmqZgDlnPzMNP9DcXUGXWOk/c9XYOfe9KreV65iNRM70bf9swJdLWVN6BBLSco1OaaqVRIGMvtDZvJY4= ; Message-ID: <20060713161651.39567.qmail@web31809.mail.mud.yahoo.com> Received: from [63.203.180.122] by web31809.mail.mud.yahoo.com via HTTP; Thu, 13 Jul 2006 09:16:51 PDT Date: Thu, 13 Jul 2006 09:16:51 -0700 (PDT) From: Richard Broersma Jr Subject: Re: How to find entries missing in 2nd table? To: Aaron Bono , "Exner, Peter" Cc: Richard Broersma Jr , SQL Postgresql List In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/200 X-Sequence-Number: 25774 > > 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?