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 1jRmV3-0005Y6-0u for pgsql-docs@arkaria.postgresql.org; Fri, 24 Apr 2020 00:47:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jRmV1-0002lH-TV for pgsql-docs@arkaria.postgresql.org; Fri, 24 Apr 2020 00:47:23 +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 1jRmV1-0002l9-J9 for pgsql-docs@lists.postgresql.org; Fri, 24 Apr 2020 00:47:23 +0000 Received: from forward101o.mail.yandex.net ([2a02:6b8:0:1a2d::601]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRmUx-0000M6-Bg for pgsql-docs@lists.postgresql.org; Fri, 24 Apr 2020 00:47:22 +0000 Received: from mxback17j.mail.yandex.net (mxback17j.mail.yandex.net [IPv6:2a02:6b8:0:1619::93]) by forward101o.mail.yandex.net (Yandex) with ESMTP id C445D3C00903; Fri, 24 Apr 2020 03:47:14 +0300 (MSK) Received: from myt5-1ebfaac9e69d.qloud-c.yandex.net (myt5-1ebfaac9e69d.qloud-c.yandex.net [2a02:6b8:c12:3b2d:0:640:1ebf:aac9]) by mxback17j.mail.yandex.net (mxback/Yandex) with ESMTP id a4EWH63soV-lEbafIxe; Fri, 24 Apr 2020 03:47:14 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ya.ru; s=mail; t=1587689234; bh=5BDBNvm9zgallNE7q14r0MReTayUp4Yxd16vT/7N3NE=; h=To:In-Reply-To:Subject:Cc:From:References:Date:Message-Id; b=l4eG+nK1JpP0We0kPLNhRed0q8aBFtXARCocd8CGp+eEoOslFNIAHBVQWbxi0NZxn Wb8Zi968pcJNVzSMnqk21/NbyQRngM6iXf5bapygY+0H6KICKT2H03A3LGeq08gHNY St45oI+HZ4YBX+64oWEuZpZprv9m1/FLSaPnGstc= Authentication-Results: mxback17j.mail.yandex.net; dkim=pass header.i=@ya.ru Received: by myt5-1ebfaac9e69d.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id XWrAyH2Ieg-lEW03xqV; Fri, 24 Apr 2020 03:47:14 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: =?utf-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= Mime-Version: 1.0 (1.0) Subject: Re: explanation for random_page_cost is outdated Date: Fri, 24 Apr 2020 03:47:13 +0300 Message-Id: <72492300-BFD4-4CCF-9136-20CC41A18A10@ya.ru> References: <20200319205646.GB28431@momjian.us> Cc: pgsql-docs@lists.postgresql.org In-Reply-To: <20200319205646.GB28431@momjian.us> To: Bruce Momjian X-Mailer: iPhone Mail (17D50) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Yep. Unclear. What parameter is recommended for SSD? Lower? 3? 2? 1? Much better will be write: if you use SSD set 1. =D0=9E=D0=BB=D0=B5=D0=B3 > 19 =D0=BC=D0=B0=D1=80=D1=82=D0=B0 2020 =D0=B3., =D0=B2 23:56, Bruce Momjia= n =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0): >=20 > =EF=BB=BFOn Thu, Feb 27, 2020 at 02:48:44PM +0000, PG Doc comments form wr= ote: >> The following documentation comment has been logged on the website: >>=20 >> Page: https://www.postgresql.org/docs/12/runtime-config-query.html >> Description: >>=20 >> Explanation for random_page_cost is rather outdated, because it did only f= or >> case of mechanical hdd. But all modern database servers, which I know, ma= de >> upon SSD. Do or not do default value for random_page_cost equal to 1 is t= he >> question, but, IMHO, at list in the documentation about random_page_cost= >> need to add in a speculation about SSD. >>=20 >> It's important because a business programming now is mostly web programmi= ng. >> 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 datab= ase >> is on SSD, of cause. With default random_page_cost=3D4 GIN index don't u= sed >> by planner, but with random_page_cost=3D1 the result may be not excellent= , but >> acceptable for web programmers. >=20 > Does this sentence in the random_page_cost docs unclear or not have enough= > visibility: >=20 > https://www.postgresql.org/docs/12/runtime-config-query.html#RUNTIME-CO= NFIG-QUERY-CONSTANTS > =20 > 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. >=20 > --=20 > Bruce Momjian https://momjian.us > EnterpriseDB https://enterprisedb.com >=20 > + As you are, so once was I. As I am, so you will be. + > + Ancient Roman grave inscription +