Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id B09E49FB46F for ; Tue, 10 Oct 2006 23:50:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 14736-03 for ; Wed, 11 Oct 2006 02:50:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 7128B9FB46D for ; Tue, 10 Oct 2006 23:50:21 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k9B2oJ3T015752; Tue, 10 Oct 2006 22:50:20 -0400 (EDT) To: brendan.curran@gmail.com cc: Pg Performance list Subject: Re: Scrub one large table against another In-reply-to: <452C30CA.2070801@gmail.com> References: <452C1437.9040709@gmail.com> <13451.1160518445@sss.pgh.pa.us> <452C208C.5010603@gmail.com> <13912.1160520427@sss.pgh.pa.us> <452C30CA.2070801@gmail.com> Comments: In-reply-to Brendan Curran message dated "Tue, 10 Oct 2006 17:46:18 -0600" Date: Tue, 10 Oct 2006 22:50:19 -0400 Message-ID: <15751.1160535019@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/218 X-Sequence-Number: 21347 Brendan Curran writes: > So much time is being spent in the Unique and Sort leaves... I would > think that it wouldn't need to do the unique portion, since there is no > DISTINCT clause... There's nothing in that query suggesting that suppress.email is unique. If you know that it is, try using a plain join instead of an IN. regards, tom lane