Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 33731B5DC02 for ; Mon, 26 Sep 2011 14:35:20 -0300 (ADT) 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 11659-03 for ; Mon, 26 Sep 2011 17:35:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 978CCB5DC04 for ; Mon, 26 Sep 2011 14:35:12 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p8QHZBeF010131; Mon, 26 Sep 2011 13:35:11 -0400 (EDT) To: Craig James cc: pgsql-performance@postgresql.org Subject: Re: Performance Anomaly with "col in (A, B)" vs. "col = A OR col = B" ver. 9.0.3 In-reply-to: <4E80B3F9.8070001@emolecules.com> References: <9594.1317056871@sss.pgh.pa.us> <4E80B3F9.8070001@emolecules.com> Comments: In-reply-to Craig James message dated "Mon, 26 Sep 2011 10:18:49 -0700" Date: Mon, 26 Sep 2011 13:35:11 -0400 Message-ID: <10130.1317058511@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/371 X-Sequence-Number: 45147 Craig James writes: > On 9/26/11 10:07 AM, Tom Lane wrote: >> Cranking up the statistics target for the hts_code_id column (and re-ANALYZEing) ought to fix it. If all your tables are this large you might want to just increase default_statistics_target across the board. regards, tom lane > This is common advice in this forum .... but what's the down side to increasing statistics? With so many questions coming to this forum that are due to insufficient statistics, why not just increase the default_statistics_target? I assume there is a down side, but I've never seen it discussed. Does it increase planning time? Analyze time? Take lots of space? Yes, yes, and yes. We already did crank up the default default_statistics_target once (in 8.4), so I'm hesitant to do it again. regards, tom lane