Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jF2Dk-0001ua-MM for pgsql-docs@arkaria.postgresql.org; Thu, 19 Mar 2020 20:56:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jF2Dj-0001EA-9q for pgsql-docs@arkaria.postgresql.org; Thu, 19 Mar 2020 20:56:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jF2Di-0001E3-VA for pgsql-docs@lists.postgresql.org; Thu, 19 Mar 2020 20:56:51 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jF2Dg-0000Kv-AR for pgsql-docs@lists.postgresql.org; Thu, 19 Mar 2020 20:56:49 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1jF2Df-0003Th-0D; Thu, 19 Mar 2020 16:56:47 -0400 Date: Thu, 19 Mar 2020 16:56:46 -0400 From: Bruce Momjian To: splarv@ya.ru, pgsql-docs@lists.postgresql.org Subject: Re: explanation for random_page_cost is outdated Message-ID: <20200319205646.GB28431@momjian.us> References: <158281492445.30439.15446208692175239579@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <158281492445.30439.15446208692175239579@wrigleys.postgresql.org> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Feb 27, 2020 at 02:48:44PM +0000, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/12/runtime-config-query.html > Description: > > Explanation for random_page_cost is rather outdated, because it did only for > case of mechanical hdd. But all modern database servers, which I know, made > upon SSD. Do or not do default value for random_page_cost equal to 1 is the > question, but, IMHO, at list in the documentation about random_page_cost > need to add in a speculation about SSD. > > It's important because a business programming now is mostly web programming. > Most database is poorly designed by web programmer, tables looked like a > primary key and a huge json (containing all) with large gin index upon it. > Now I am seeing a table with a GIN index 50% of the table size. The database > is on SSD, of cause. With default random_page_cost=4 GIN index don't used > by planner, but with random_page_cost=1 the result may be not excellent, but > acceptable for web programmers. Does this sentence in the random_page_cost docs unclear or not have enough visibility: https://www.postgresql.org/docs/12/runtime-config-query.html#RUNTIME-CONFIG-QUERY-CONSTANTS Storage that has a low random read cost relative to sequential, e.g. solid-state drives, might also be better modeled with a lower value for random_page_cost. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +