Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id BFCE69FB3C5 for ; Thu, 12 Oct 2006 15:25:17 -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 82041-05 for ; Thu, 12 Oct 2006 18:25:13 +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 E7B429FB2C3 for ; Thu, 12 Oct 2006 15:25:12 -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 k9CIP9Zk014925; Thu, 12 Oct 2006 14:25:09 -0400 (EDT) To: brendan.curran@gmail.com cc: "Jim C. Nasby" , g@nasby.net, Pg Performance list Subject: Re: Scrub one large table against another In-reply-to: <452E83D0.5060309@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> <15751.1160535019@sss.pgh.pa.us> <452D2195.8010907@gmail.com> <20061011205251.GR13487@nasby.net> <452E83D0.5060309@gmail.com> Comments: In-reply-to Brendan Curran message dated "Thu, 12 Oct 2006 12:05:04 -0600" Date: Thu, 12 Oct 2006 14:25:09 -0400 Message-ID: <14924.1160677509@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/254 X-Sequence-Number: 21383 Brendan Curran writes: > I'll tack up a note to the online documentation letting people know so > that it's a little more explicitly clear that when you choose IN on > data that isn't explicitly unique (to the planner i.e. post-analyze) > you get the baggage of a forced unique whether you need it or not. Or > perhaps someone that knows the internals of the planner a little > better than me should put some info up regarding that? You get a forced unique step, period --- the planner doesn't try to shortcut on the basis of noticing a relevant unique constraint. We have some plan techniques that might look like they are not checking uniqueness (eg, an "IN Join") but they really are. This is an example of what I was talking about just a minute ago, about not wanting to rely on constraints that could go away while the plan is still potentially usable. It's certainly something that we should look at adding as soon as the plan-invalidation infrastructure is there to make it safe to do. regards, tom lane