Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 5A47AB5DBCC for ; Thu, 12 May 2011 16:20:56 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 97597-06 for ; Thu, 12 May 2011 19:20:49 +0000 (UTC) Received: from mx1.hub.org (mx1.hub.org [200.46.208.106]) by mail.postgresql.org (Postfix) with ESMTP id 74329B5D8BD for ; Thu, 12 May 2011 16:20:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp2.peak6.com (smtp2.peak6.com [38.98.137.9]) by mx1.hub.org (Postfix) with ESMTP id 395BD3261B7B for ; Thu, 12 May 2011 16:11:52 +0000 (UTC) X-AuditID: 0a02cb1e-b7b7eae000002a28-55-4dcc06a9b40a Message-ID: <4DCC06A9.9020509@peak6.com> Date: Thu, 12 May 2011 11:11:21 -0500 From: Shaun Thomas Reply-To: Organization: Peak6 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: Tom Lane CC: Josh Berkus , Subject: Re: Postgres refusing to use >1 core References: <4DC81A3F020000250003D433@gw.wicourts.gov> <4DC81D56020000250003D438@gw.wicourts.gov> <4DC8B893.3060908@postnewspapers.com.au> <4DC9E7C5.9080309@postnewspapers.com.au> <4DCAB3A1.2090507@peak6.com> <201105111953.060147@ms14.lnh.mail.rcn.net> <4DCB0802.9060505@peak6.com> <4DCB346E.8070608@agliodbs.com> <15686.1305211902@sss.pgh.pa.us> <4DCC0167.8080903@peak6.com> <18068.1305216474@sss.pgh.pa.us> In-Reply-To: <18068.1305216474@sss.pgh.pa.us> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed content-transfer-encoding: 7bit X-Originating-IP: [10.10.221.50] X-Brightmail-Tracker: AAAAAQAAAZE= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201105/185 X-Sequence-Number: 43694 On 05/12/2011 11:07 AM, Tom Lane wrote: > I find it odd that replacing the subquery with a temp table helps, > though, because (unless you stuck in an ANALYZE you didn't mention) > it would have no stats at all about the number of groups in the temp > table. I did have an analyze initially for exactly that reason. But what I found odd is that in my rush to execute this for the end of day reports, I forgot that step, and it still ran fine. I've found that the planner tends to treat un-analyzed tables somewhat pessimistically, which is fine by me. -- Shaun Thomas OptionsHouse | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604 312-676-8870 sthomas@peak6.com ______________________________________________ See http://www.peak6.com/email_disclaimer.php for terms and conditions related to this email