Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 98AC0632DD8 for ; Mon, 31 May 2010 16:55:57 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 63544-03 for ; Mon, 31 May 2010 19:55:50 +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 A01DA632B7D for ; Mon, 31 May 2010 16:55:50 -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 o4VJtXl1018311; Mon, 31 May 2010 15:55:33 -0400 (EDT) To: Jesper Krogh cc: pgsql-performance@postgresql.org Subject: Re: planner costs in "warm cache" tests In-reply-to: <4C040488.30906@krogh.cc> References: <4C02A342.40801@krogh.cc> <14644.1275244491@sss.pgh.pa.us> <4C040488.30906@krogh.cc> Comments: In-reply-to Jesper Krogh message dated "Mon, 31 May 2010 20:48:40 +0200" Date: Mon, 31 May 2010 15:55:33 -0400 Message-ID: <18310.1275335733@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.51 tagged_above=-10 required=5 tests=BAYES_05=-0.5, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/272 X-Sequence-Number: 38856 Jesper Krogh writes: > On 2010-05-30 20:34, Tom Lane wrote: >> Well, hmm, I really doubt that that represents reality either. A page >> access is by no means "free" even when the page is already in cache. >> I don't recall anyone suggesting that you set these numbers to less >> than perhaps 0.01. >> > Thank you for the prompt response. Is it a "false assumption" that the > cost should in some metric between different plans be a measurement > of actual run-time in a dead-disk run? Well, the default cost parameters (seq_page_cost=1, random_page_cost=4) are intended to model the non-cached state where most page fetches actually do require a disk access. They are definitely too large relative to the cpu_xxx_cost parameters when you have a fully-cached database, but what I've seen people recommending for that condition is to set them both to the same value in the vicinity of 0.1 or 0.01 or so. If it's only mostly cached you might try intermediate settings. regards, tom lane