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 1n2A8P-0005M7-4e for pgsql-docs@arkaria.postgresql.org; Tue, 28 Dec 2021 10:55:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n2A8M-0008SU-U8 for pgsql-docs@arkaria.postgresql.org; Tue, 28 Dec 2021 10:55:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2A8M-0008SL-Ka for pgsql-docs@lists.postgresql.org; Tue, 28 Dec 2021 10:55:10 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n2A8G-0005SY-HJ for pgsql-docs@lists.postgresql.org; Tue, 28 Dec 2021 10:55:09 +0000 Received: by mail-wm1-x32b.google.com with SMTP id n10-20020a7bc5ca000000b00345c520d38eso9762274wmk.1 for ; Tue, 28 Dec 2021 02:55:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=PqnEGJHVyTBHUzyIdfdewFGPfArHWFSVm9rCCmviJGc=; b=m9IB2DXXo3rrtjTyKhB4a/HGTYrWt6rr5esHyfxNvs+gDadq/43mcrSad+frpZfTJN tmJHlm/A/qVLMbm+nRNmG9Qw+ka8yMFvAbCQXaZzj3mv6SXcNtFg9Eg5PFyKbgIe10gS tlr/f843yso89SWDirxDe0c7HtD7BESQgVYtEYHJAnmjt73NXPnAPsURryogIaXyii/Q Bw+Qfz9fVA+SgCHW8QG8zhloS0hTEdk44+5tPSXzpUDoHbu2TpFHIOPZpb+eRHJr5z4d pTol93Tw1ByAkcepKksruXMrmK3Hs9FJW9BEBgC0TeUMdSWyY72H6AJyxC7wWxG1WH6l /FLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=PqnEGJHVyTBHUzyIdfdewFGPfArHWFSVm9rCCmviJGc=; b=XSTuhjV15FOUvl1uhoYjtqYiApU6bM9t32xwMH7zI48vj2WmfBZiZlS65JIpJ1jhnP Rlvo+Hnv487ZFpmgeSmTPKedVmH2vchctt2QVJJJE2SiA3B7VdRIAQy9VVFLY54NDBop WSLwVGvc3y/27XBhZHwHQpM9PNvg0yQBPWVsGjrpPxwon5GLa6VRCh2rdqUMhTpwPm5M pPP6zHGpuRmXp9LIcXeNnfK2yOwPncquMwLqrfooR7Cv/mIYR3BdXfxYSgFkC6PtTphL 0EYTzx6eTwdYyj63pCTK4Qr4HXiBAfJK2/rninwvDL9UyDMlGOwWspHloYm0zIUbtzQ0 IK4Q== X-Gm-Message-State: AOAM531a+fAIm11cQuyoT1PdYfOLXwdGWfrmL6j1qx/tQfjOXZpvsXAX 0hhbmFd9kLrAzcypXdR/F8xuayP+Hps= X-Google-Smtp-Source: ABdhPJzNuGOmkF0xge4HQMH6rrrY5sXJuaUzSMH+lSRftf7vkS05vFI4Pqici3pt5uz3T2OtegW+xQ== X-Received: by 2002:a05:600c:384e:: with SMTP id s14mr16387136wmr.53.1640688902340; Tue, 28 Dec 2021 02:55:02 -0800 (PST) Received: from ?IPv6:2a02:8388:e002:8cf0:d51a:d0ef:f60c:aa3a? (2a02-8388-e002-8cf0-d51a-d0ef-f60c-aa3a.cable.dynamic.v6.surfer.at. [2a02:8388:e002:8cf0:d51a:d0ef:f60c:aa3a]) by smtp.googlemail.com with ESMTPSA id g6sm17858689wri.67.2021.12.28.02.55.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Dec 2021 02:55:01 -0800 (PST) To: pgsql-docs@lists.postgresql.org From: Mathias Kunter Subject: random_page_cost configuration parameter Message-ID: <9271c072-e91d-4dc5-c0a9-197f47291671@gmail.com> Date: Tue, 28 Dec 2021 11:55:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-AT Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello all, 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. Source: https://www.postgresql.org/docs/current/runtime-config-query.html#RUNTIME-CONFIG-QUERY-CONSTANTS 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. Such a database system would be best modeled with random_page_cost < seq_page_cost. Please correct me if I'm wrong. Best regards Mathias Kunter