Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 904321337B2F for ; Wed, 13 Apr 2011 18:52:50 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 17408-09 for ; Wed, 13 Apr 2011 21:52:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 45C19133798E for ; Wed, 13 Apr 2011 18:52:41 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p3DLqaKg025735; Wed, 13 Apr 2011 17:52:36 -0400 (EDT) To: Claudio Freire cc: Kevin Grittner , Ogden , Tomas Vondra , pgsql-performance@postgresql.org Subject: Re: Performance In-reply-to: References: <20110412171855.GA14292@tux> <4DA496FA.3070908@fuzzy.cz> <8F22D592-23C1-4A3C-94A5-48363332ADD3@darkstatic.com> <4DA4BFA2.5060601@fuzzy.cz> <4DA4D40A.4010200@fuzzy.cz> <4DA56DA8020000250003C783@gw.wicourts.gov> Comments: In-reply-to Claudio Freire message dated "Wed, 13 Apr 2011 23:17:18 +0200" Date: Wed, 13 Apr 2011 17:52:36 -0400 Message-ID: <25734.1302731556@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/197 X-Sequence-Number: 43259 Claudio Freire writes: > On Wed, Apr 13, 2011 at 4:32 PM, Kevin Grittner > wrote: >> If you model the costing to reflect the reality on your server, good >> plans will be chosen. > Wouldn't it be "better" to derive those costs from actual performance > data measured at runtime? > Say, pg could measure random/seq page cost, *per tablespace* even. > Has that been tried? Getting numbers that mean much of anything is a slow, expensive process. You really don't want the database trying to do that for you. Once you've got them, you *really* don't want the database editorializing on them. regards, tom lane