Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id EA626650E91 for ; Sat, 28 Jun 2008 12:53:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 78440-01 for ; Sat, 28 Jun 2008 12:53:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id CF006650E7F for ; Sat, 28 Jun 2008 12:53:46 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m5SFrhqO029010; Sat, 28 Jun 2008 11:53:43 -0400 (EDT) To: Ulrich cc: pgsql-performance@postgresql.org Subject: Re: Subquery WHERE IN or WHERE EXISTS faster? In-reply-to: <48665741.2060900@gmx.net> References: <48665741.2060900@gmx.net> Comments: In-reply-to Ulrich message dated "Sat, 28 Jun 2008 17:22:41 +0200" Date: Sat, 28 Jun 2008 11:53:43 -0400 Message-ID: <29009.1214668423@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/204 X-Sequence-Number: 30554 Ulrich writes: > People say that [EXISTS is faster] People who say that are not reliable authorities, at least as far as Postgres is concerned. But it is always a bad idea to extrapolate results on toy tables to large tables --- quite aside from measurement noise and caching issues, the planner might pick a different plan when faced with large tables. Load up a realistic amount of data and then see what you get. regards, tom lane