X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E7A8F3A2CF7 for ; Sat, 15 Jan 2005 21:33:39 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 58132-04 for ; Sat, 15 Jan 2005 21:33:30 +0000 (GMT) Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by svr1.postgresql.org (Postfix) with ESMTP id 44B7D3A2CF6 for ; Sat, 15 Jan 2005 21:33:31 +0000 (GMT) X-EthosMedia-Virus-Scanned: no infections found Received: from [63.195.55.98] (account josh@agliodbs.com HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 6911389; Sat, 15 Jan 2005 13:35:11 -0800 From: Josh Berkus Organization: Aglio Database Solutions To: pgsql-performance@postgresql.org Subject: Re: IN() Optimization issue in 8.0rc5 Date: Sat, 15 Jan 2005 13:32:27 -0800 User-Agent: KMail/1.6.2 Cc: Tom Lane References: <200501151223.10372.josh@agliodbs.com> <11485.1105822417@sss.pgh.pa.us> In-Reply-To: <11485.1105822417@sss.pgh.pa.us> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200501151332.27896.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/198 X-Sequence-Number: 9888 Tom, > Hmm. What you want for a NOT IN is for it to say > Filter: (NOT (hashed subplan)) > which you are not getting. What's the datatypes of the two personid > columns? INT > Is the 400k-row estimate for person_attributes reasonable? Yes, the estimates are completely accurate. > Maybe you need to increase work_mem (nee sort_mem) to allow a > 400k-row hash table? Aha, that's it. I thought I'd already set that, but apparently it was a different session. Fixed. Thanks! -- Josh Berkus Aglio Database Solutions San Francisco