Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 815A12E008A for ; Mon, 9 Jun 2008 15:08:57 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 75533-01-3 for ; Mon, 9 Jun 2008 15:08:48 -0300 (ADT) X-Greylist: delayed 00:23:35.493264 by SQLgrey-1.7.6 Received: from sca-es-mail-1.sun.com (sca-es-mail-1.Sun.COM [192.18.43.132]) by developer.postgresql.org (Postfix) with ESMTP id EF11F2E0095 for ; Mon, 9 Jun 2008 15:08:40 -0300 (ADT) Received: from fe-sfbay-09.sun.com ([192.18.43.129]) by sca-es-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m59Hj2C8002225 for ; Mon, 9 Jun 2008 10:45:03 -0700 (PDT) Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K2700301GQSR200@fe-sfbay-09.sun.com> (original mail from josh@agliodbs.com) for pgsql-hackers@postgresql.org; Mon, 09 Jun 2008 10:45:02 -0700 (PDT) Received: from josh-berkus-computer-2.local ([64.81.245.111]) by fe-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0K270064WIN0XGG0@fe-sfbay-09.sun.com>; Mon, 09 Jun 2008 10:45:01 -0700 (PDT) Date: Mon, 09 Jun 2008 10:45:00 -0700 From: Josh Berkus Subject: Re: Overhauling GUCS In-reply-to: <87hcc3le52.fsf@oxford.xeocode.com> To: Gregory Stark Cc: "Joshua D. Drake" , Tom Lane , Robert Treat , pgsql-hackers@postgresql.org, Peter Eisentraut , Greg Smith , Andreas Pflug , Decibel! Message-id: <484D6C1C.5070004@agliodbs.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=UTF-8 Content-transfer-encoding: 7BIT References: <48409D1E.3070208@agliodbs.com> <29525.1212613052@sss.pgh.pa.us> <200806061435.01196.peter_e@gmx.net> <200806061624.29105.xzilla@users.sourceforge.net> <8358.1212797962@sss.pgh.pa.us> <1212800891.14299.35.camel@jd-laptop> <87hcc3le52.fsf@oxford.xeocode.com> User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/419 X-Sequence-Number: 119532 Tom, >>> Actually, the reason it's still 10 is that the effort expended to get it >>> changed has been *ZERO*. I keep asking for someone to make some >>> measurements, do some benchmarking, anything to make a plausible case >>> for a specific higher value as being a reasonable place to set it. >>> The silence has been deafening. >> Not surprising really. It is a simple adjustment to make and it also is >> easy to spot when its a problem. However it is not trivial to test for >> (in terms of time and effort). I know 10 is wrong and so do you. If you >> don't I am curious why I see so many posts from you saying, "Your >> estimates are off, what is your default_statistics_target?" with yet >> even more responses saying, "Uhh 10." I tried (back in 7.4) to do some systematic testing of this. The problem is that the cases were higher d_s_t are required are specifically ones with complex, unbalanced data distributions and/or very large databases. This makes test cases extremely difficult and time-consuming to generate; further, I found that the test cases I had from my clients' databases were not portable (in addition to being confidential). Also, I'd actually assert that "10" seems to be perfectly adequate for the majority of users. That is, the number of users where I've recommended increasing d_s_t for the whole database is smaller than the number where I don't, and of course we never hear from most users at all. So I'm pretty happy recommending "Leave the default. If you encounter problem queries, increase it to 100, and analyse the database. If you're running a data warehouse, increase it to 1000." Where analyze does systematically fall down is with databases over 500GB in size, but that's not a function of d_s_t but rather of our tiny sample size. --Josh