X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 538C7D1B4AC for ; Mon, 5 Jan 2004 01:41:25 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 68363-08 for ; Sun, 4 Jan 2004 21:40:38 -0400 (AST) Received: from millenium.mst.co.jp (unknown [210.230.185.241]) by svr1.postgresql.org (Postfix) with ESMTP id 0BC0BD1B44C for ; Sun, 4 Jan 2004 21:40:34 -0400 (AST) Received: from mst1x5r347kymb (lc12114 [192.168.1.114]) by millenium.mst.co.jp (8.11.6p2/3.7W) with SMTP id i051T6J31985; Mon, 5 Jan 2004 10:29:06 +0900 Message-ID: <001601c3d32c$dd0267d0$7201a8c0@mst1x5r347kymb> From: "Iain" To: "Tom Lane" Cc: References: <013d01c3ca89$7307d7d0$7201a8c0@mst1x5r347kymb> <20597.1072369941@sss.pgh.pa.us> Subject: Re: not in vs not exists - vastly diferent performance Date: Mon, 5 Jan 2004 10:40:13 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/25 X-Sequence-Number: 16418 Hi Tom, > You didn't say what PG version you are using, but I'd venture to bet > it is pre-7.4. Sorry I didn't give the version number, here is the output from select version(): PostgreSQL 7.4 on i686-pc-linux-gnu, compiled by GCC 2.95.3 This is the first time that we have compiled the system from source, previously we used rpm, but it seems very straight forward. I don't know if there may have been something we did wrong there. I understand that every DB environment is different, but it sounds like for the example I gave, you expected that the NOT IN optimization would have chosen a better plan. As to why it didn't I have no idea at this stage. If there is anything you want me to do to test it, for example on the regression test DB, then let me know. regards Iain