Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id C56459FB678 for ; Mon, 21 May 2007 06:15:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 93266-06-2 for ; Mon, 21 May 2007 06:15:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from outmail136054.authsmtp.net (outmail136054.authsmtp.net [62.13.136.54]) by postgresql.org (Postfix) with ESMTP id 551239FB664 for ; Mon, 21 May 2007 06:15:04 -0300 (ADT) Received: from outmail128178.authsmtp.net (outmail128178.authsmtp.net [62.13.128.178]) by punt2.authsmtp.com (8.13.8/8.13.8/Kp) with ESMTP id l4L9EpeP087038; Mon, 21 May 2007 10:14:51 +0100 (BST) Received: from [192.168.75.200] ([24.114.252.226]) (authenticated bits=0) by mail.authsmtp.com (8.13.8/8.13.8/Kp) with ESMTP id l4L9EnLE073817; Mon, 21 May 2007 10:14:50 +0100 (BST) Message-ID: <465162E6.4030205@agliodbs.com> Date: Mon, 21 May 2007 05:14:14 -0400 From: Josh Berkus User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) MIME-Version: 1.0 To: pgsql-performance@nullmx.com CC: pgsql-performance@postgresql.org Subject: Re: Rewriting DISTINCT and losing performance References: <200705202228.32129.pgsql-performance@nullmx.com> In-Reply-To: <200705202228.32129.pgsql-performance@nullmx.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Server-Quench: bab6a4de-077b-11dc-a443-001185d377ca X-AuthRoute: OCdyZgscClZXSx8a IioLCC5HRQ8+YBZL BAkGMA9GIUINWEQL c1AAdx12OUxbHwkB BHYKW15VVFd0WS13 bxRQbAFDYE9MQQdo VldLR1BXCwUmXRh9 D2tALmxycAZOeXk+ Yk5jECIKDkIrcRIo X05TEj8bZGY0O31O VERbagNUcQJCe0tG bVcsBT1vNG8XDRoV JSEUBRUEdQ9SNz5U XgALIho+YH03PxgX e1gLGzlnGUoeRiM8 ZwQrMFAbBkMYNE4/ WXNh X-Authentic-SMTP: 61633136333939.squirrel.dmpriest.net.uk:669/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/389 X-Sequence-Number: 24779 Chuck, > explain analyze > SELECT country_id, country_name > FROM geo.country > WHERE country_id IN > (select country_id FROM geo.city) > ; > > -- won't complete in a reasonable amount of time. Can we see the plan? --Josh