Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id E99A863EA3F for ; Sun, 14 Mar 2010 20:57:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 82169-01 for ; Sun, 14 Mar 2010 23:56:50 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id 8B0FB63E84A for ; Sun, 14 Mar 2010 20:56:50 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.3/8.14.3) with ESMTP id o2ENuju3007255 for ; Sun, 14 Mar 2010 20:56:45 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.3/8.14.3/Submit) id o2ENRPAi096126 for pgsql-performance@postgresql.org; Sun, 14 Mar 2010 20:27:25 -0300 (ADT) (envelope-from news) From: "Carlo Stonebanks" X-Newsgroups: pgsql.performance Subject: default_statistics_target Date: Sun, 14 Mar 2010 19:27:57 -0400 Organization: Hub.Org Networking Services Lines: 20 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6002.18005 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18005 To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.32 tagged_above=-10 required=5 tests=BAYES_50=0.001, SARE_MILLIONSOF=0.315, STOX_REPLY_TYPE=0.001, TRACKER_ID=2.003 X-Spam-Level: ** X-Archive-Number: 201003/136 X-Sequence-Number: 37961 Hi people, The whole topic of messing with stats makes my head spin but I am concerned about some horridly performing queries that have had bad rows estimates and others which always choose seq scans when indexes are available. Reading up on how to improve planner estimates, I have seen references to default_statistics_target being changed from the default of 10 to 100. Our DB is large, with thousands of tables, but the core schema has about 100 tables and the typical row counts are in the millions of rows for the whole table. We have been playing endless games with tuning this server - but with all of the suggestions, I don't think the issue of changing default_statistics_target has ever come up. Realizing that there is a performance hit associated with ANALYZE, are there any other downsides to increasing this value to 100, and is this a common setting for large DBs? Thanks, Carlo