X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A0CE95365B for ; Fri, 13 May 2005 13:22:15 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 69944-07 for ; Fri, 13 May 2005 16:22:10 +0000 (GMT) Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by svr1.postgresql.org (Postfix) with ESMTP id 408E15350F for ; Fri, 13 May 2005 13:22:09 -0300 (ADT) X-EthosMedia-Virus-Scanned: no infections found Received: from [63.195.55.98] (account josh@agliodbs.com HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 7358973; Fri, 13 May 2005 09:24:10 -0700 From: Josh Berkus Organization: Aglio Database Solutions To: Christopher Browne Subject: Re: Recommendations for set statistics Date: Fri, 13 May 2005 09:22:11 -0700 User-Agent: KMail/1.8 Cc: pgsql-performance@postgresql.org References: <428416D8.8060303@laliluna.de> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200505130922.11582.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.014 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/265 X-Sequence-Number: 12429 Chris, > It is widely believed that a somewhat larger default than 10 would be > a "good thing," as it seems to be fairly common for 10 to be too small > to allow statistics to be stable. =A0But nobody has done any formal > evaluation as to whether it would make sense to jump from 10 to: > > =A0- 15? > =A0- 20? > =A0- 50? > =A0- 100? > =A0- More than that? My anecdotal experience is that if more than 10 is required, you generally= =20 need to jump to at least 100, and more often 250. On the other end, I've= =20 generally not found any difference between 400 and 1000 when it comes to=20 "bad" queries. I have an unfinished patch in the works which goes through and increases th= e=20 stats_target for all *indexed* columns to 100 or so. However, I've needed= =20 to work up a test case to prove the utility of it. =2D-=20 Josh Berkus Aglio Database Solutions San Francisco