X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 1EEA111F61E9 for ; Tue, 18 Apr 2006 20:38:38 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.309 X-Spam-Level: X-Spam-Status: No, score=-2.309 required=5 tests=[AWL=0.292, BAYES_00=-2.599, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id E32h1IyKpyE3 for ; Tue, 18 Apr 2006 20:38:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id E3EAF11F6106 for ; Tue, 18 Apr 2006 20:38:34 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k3INcXJu020065; Tue, 18 Apr 2006 19:38:33 -0400 (EDT) To: Markus Schaber cc: pgsql-performance@postgresql.org Subject: Re: merge>hash>loop In-reply-to: <4444C4CF.2000106@logix-tt.com> References: <1145029009.3422.31.camel@spectre.intellivid.com> <10000.1145031205@sss.pgh.pa.us> <1145033149.3422.41.camel@spectre.intellivid.com> <11035.1145033929@sss.pgh.pa.us> <4444C4CF.2000106@logix-tt.com> Comments: In-reply-to Markus Schaber message dated "Tue, 18 Apr 2006 12:51:59 +0200" Date: Tue, 18 Apr 2006 19:38:33 -0400 Message-ID: <20064.1145403513@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200604/410 X-Sequence-Number: 18494 Markus Schaber writes: > An easy first approach would be to add a user tunable cache probability > value to each index (and possibly table) between 0 and 1. Then simply > multiply random_page_cost with (1-that value) for each scan. That's not the way you'd need to use it. But on reflection I do think there's some merit in a "cache probability" parameter, ranging from zero (giving current planner behavior) to one (causing the planner to assume everything is already in cache from prior queries). We'd have to look at exactly how such an assumption should affect the cost equations ... regards, tom lane