Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2Ewl-0003aC-K7 for pgsql-docs@arkaria.postgresql.org; Tue, 28 Dec 2021 16:03:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n2Ewk-0001QY-63 for pgsql-docs@arkaria.postgresql.org; Tue, 28 Dec 2021 16:03:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2Ewj-0001QP-V7 for pgsql-docs@lists.postgresql.org; Tue, 28 Dec 2021 16:03:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2Ewh-0004r3-SO for pgsql-docs@lists.postgresql.org; Tue, 28 Dec 2021 16:03:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1BSG3PBn1760892; Tue, 28 Dec 2021 11:03:25 -0500 From: Tom Lane To: Mathias Kunter cc: pgsql-docs@lists.postgresql.org Subject: Re: random_page_cost configuration parameter In-reply-to: <9271c072-e91d-4dc5-c0a9-197f47291671@gmail.com> References: <9271c072-e91d-4dc5-c0a9-197f47291671@gmail.com> Comments: In-reply-to Mathias Kunter message dated "Tue, 28 Dec 2021 11:55:00 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1760890.1640707405.1@sss.pgh.pa.us> Date: Tue, 28 Dec 2021 11:03:25 -0500 Message-ID: <1760891.1640707405@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Mathias Kunter writes: > the documentation of the random_page_cost configuration parameter says: >> Although the system will let you set random_page_cost to less than >> seq_page_cost, it is not physically sensible to do so. > However, I don't think this statement is true. Consider the situation > where the randomly fetched pages are mostly (or even entirely) cached in > RAM, but where the sequentially fetched pages must be mostly read from > disk. An example for such a scenario is a database system which uses > RAM-cached indices. I think fooling with effective_cache_size is a better way to model that situation. regards, tom lane