Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 8C1211337B77 for ; Thu, 3 Feb 2011 20:13:33 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 23861-07 for ; Fri, 4 Feb 2011 00:13:26 +0000 (UTC) X-Greylist: delayed 00:05:12.882537 by SQLgrey-1.7.6 Received: from mail-vw0-f46.google.com (mail-vw0-f46.google.com [209.85.212.46]) by mail.postgresql.org (Postfix) with ESMTP id 4907C1337B49 for ; Thu, 3 Feb 2011 20:13:26 -0400 (AST) Received: by vws16 with SMTP id 16so1100627vws.19 for ; Thu, 03 Feb 2011 16:13:26 -0800 (PST) Received: by 10.220.179.198 with SMTP id br6mr3006193vcb.28.1296778092962; Thu, 03 Feb 2011 16:08:12 -0800 (PST) Received: from Craig-Jamess-MacBook-Pro.local (wsip-70-167-122-86.sd.sd.cox.net [70.167.122.86]) by mx.google.com with ESMTPS id p8sm68570vcr.18.2011.02.03.16.08.11 (version=SSLv3 cipher=RC4-MD5); Thu, 03 Feb 2011 16:08:12 -0800 (PST) Message-ID: <4D4B436A.5030002@emolecules.com> Date: Thu, 03 Feb 2011 16:08:10 -0800 From: Craig James User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: [HACKERS] Slow count(*) again... References: <201102012247.p11Ml6u02682@momjian.us> <4D48914B.4050403@dunslane.net> <4D489AD1.1010105@vmsinfo.com> <4D499E55.4020107@vmsinfo.com> <4D49A6B9.4060608@2ndquadrant.com> <4D49C482.4010707@vmsinfo.com> <4D49F0BA.9000901@2ndquadrant.com> <4D4A16BF.1020304@vmsinfo.com> <4D4A4844.3020409@2ndquadrant.com> <4D4AD9F6.6040903@vmsinfo.com> <4D4AE16E.9040807@peak6.com> <4D4B17B4.9030406@vmsinfo.com> <4D4B1F5B.4060403@peak6.com> In-Reply-To: <4D4B1F5B.4060403@peak6.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.6 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201102/138 X-Sequence-Number: 42276 On 2/3/11 1:34 PM, Shaun Thomas wrote: >> I must say that this purist attitude is extremely surprising to me. >> All the major DB vendors support optimizer hints, yet in the >> Postgres community, they are considered bad with almost religious >> fervor. Postgres community is quite unique with the fatwa against >> hints. > > You missed the argument. The community, or at least the devs, see hints > as an ugly hack. Let's kill the myth right now that Postgres doesn't have hints. It DOES have hints. Just read this forum for a few days and see how many time there are suggestions like "disable nested loops" or "disable seqscan", or "change the random page cost", or "change the join collapse limit". All of these options are nothing more than a way of altering the planner's choices so that it will pick the plan that the designer already suspects is more optimal. If that's not a hint, I don't know what is. Craig