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 1jbvbb-0007cf-RV for pgsql-docs@arkaria.postgresql.org; Fri, 22 May 2020 00:32:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jbvba-00057x-ON for pgsql-docs@arkaria.postgresql.org; Fri, 22 May 2020 00:32:06 +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 1jbvYd-0002R7-2k for pgsql-docs@lists.postgresql.org; Fri, 22 May 2020 00:29:03 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbvYZ-0007fI-Vz for pgsql-docs@lists.postgresql.org; Fri, 22 May 2020 00:29:02 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1jbvYW-0005wY-Pt; Thu, 21 May 2020 20:28:56 -0400 Date: Thu, 21 May 2020 20:28:56 -0400 From: Bruce Momjian To: Pavel Stehule Cc: yigong hu , splarv@ya.ru, pgsql-docs@lists.postgresql.org Subject: Re: explanation for random_page_cost is outdated Message-ID: <20200522002856.GC30409@momjian.us> References: <20200319205646.GB28431@momjian.us> <72492300-BFD4-4CCF-9136-20CC41A18A10@ya.ru> <20200427161630.GB21731@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200427161630.GB21731@momjian.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Apr 27, 2020 at 12:16:30PM -0400, Bruce Momjian wrote: > On Mon, Apr 27, 2020 at 06:02:41AM +0200, Pavel Stehule wrote: > >  >  Storage that has a low random read cost relative to sequential, e.g. > > solid-state drives, might also be better modeled with a value that is close > > to 1 for random_page_cost. > > > > > > I depends on estimation. Lot of people use random_page_cost as fix of broken > > estimation. Then configures this value to some strange values. Lot of other > > queries with good estimation can be worse then. > > I have been recommending 1.1 as a value for random_page_cost for SSDs > for years, and I think it would be helpful to suggest that value, so doc > patch attached. Patch applied back through 9.5. -- 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 +