Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 07F3ACA1FC2 for ; Fri, 10 Feb 2012 15:33:07 -0400 (AST) Received: from smtp.01.com ([199.36.142.181]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RvwDR-0002jZ-01 for pgsql-performance@postgresql.org; Fri, 10 Feb 2012 19:33:06 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id F2B933F51E5 for ; Fri, 10 Feb 2012 13:32:51 -0600 (CST) X-Virus-Scanned: amavisd-new at smtp-out-1.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-1.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5mAYTP7eg+VQ for ; Fri, 10 Feb 2012 13:32:51 -0600 (CST) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id D11013F51E1 for ; Fri, 10 Feb 2012 13:32:51 -0600 (CST) Received: from Sidney-Stratton.local (70-36-143-92.dsl.dynamic.sonic.net [70.36.143.92]) by smtp-out-1.01.com (Postfix) with ESMTPSA id 4F9843F509E; Fri, 10 Feb 2012 13:32:51 -0600 (CST) Message-ID: <4F3570E2.2070301@agliodbs.com> Date: Fri, 10 Feb 2012 11:32:50 -0800 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.24) Gecko/20111103 Lightning/1.0b2 Thunderbird/3.1.16 MIME-Version: 1.0 To: Peter van Hardenberg CC: Jeff Janes , Scott Marlowe , pgsql-performance@postgresql.org Subject: Re: random_page_cost = 2.0 on Heroku Postgres References: <4F331866.7070401@agliodbs.com> In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/96 X-Sequence-Number: 46268 On 2/9/12 2:41 PM, Peter van Hardenberg wrote: > Hmm, perhaps we could usefully aggregate auto_explain output. The other option is to take a statistical approach. After all, what you want to do is optimize average response times across all your user's databases, not optimize for a few specific queries. So one thought would be to add in pg_stat_statements to your platform ... something I'd like to see Heroku do anyway. Then you can sample this across dozens (or hundreds) of user databases, each with RPC set to a slightly different level, and aggregate it into a heat map. That's the way I'd do it, anyway. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com