Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 268D5B5DBE7 for ; Mon, 23 May 2011 16:08:17 -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 96468-04 for ; Mon, 23 May 2011 19:08:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp-2.01.com (smtp-2.01.com [38.102.63.181]) by mail.postgresql.org (Postfix) with ESMTP id 377A4B5DBDB for ; Mon, 23 May 2011 16:08:09 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-2.01.com (Postfix) with ESMTP id EC5D81ADA80 for ; Mon, 23 May 2011 14:08:08 -0500 (CDT) Received: from smtp-2.01.com ([127.0.0.1]) by localhost (smtp-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yMZEuGjWPciQ for ; Mon, 23 May 2011 14:08:08 -0500 (CDT) Received: by smtp-2.01.com (Postfix, from userid 99) id B29411AD7A9; Mon, 23 May 2011 14:08:08 -0500 (CDT) Received: from Sidney-Stratton.local (70-36-143-243.dsl.dynamic.sonic.net [70.36.143.243]) by smtp-2.01.com (Postfix) with ESMTPSA id 378521ADF6C for ; Mon, 23 May 2011 14:08:08 -0500 (CDT) Message-ID: <4DDAB097.9070505@agliodbs.com> Date: Mon, 23 May 2011 12:08:07 -0700 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: reducing random_page_cost from 4 to 2 to force index scan References: <4DB6F4BB020000250003CEB9@gw.wicourts.gov> <2823.1305314437@sss.pgh.pa.us> <4DCD90F5.2010501@agliodbs.com> <4DD0195A.9040305@agliodbs.com> <4DD07855.8080907@postnewspapers.com.au> <4DD07B4E.1020503@2ndquadrant.com> <4DD0AB16.5060808@krogh.cc> <4DD0ACD0.1090801@krogh.cc> <16676.1305560805@sss.pgh.pa.us> <4DD487CF.8010003@2ndquadrant.com> <091662B1-58B5-489D-8A92-0251A1E01E7C@nasby.net> In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201105/309 X-Sequence-Number: 43818 > Well, all of that stuff sounds impractically expensive to me... but I > just work here. I'll point out that the simple version, which just checks for hot tables and indexes, would improve estimates greatly and be a LOT less complicated than these proposals. Certainly having some form of block-based or range-based stats would be better, but it also sounds hard enough to maybe never get done. Having user-accessible "hot" stats would also be useful to DBAs. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com