pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: ignacio.alonso@microsoft.com
To: pgsql-docs@lists.postgresql.org
Subject: Re: Definition of random_page_cost seems to invert correlation of that setting and seq_page_cost
Date: Wed, 13 Mar 2024 14:06:32 +0100
Message-ID: <b02831241a9285888c63c80cf9ea4a493aaefc58.camel@cybertec.at> (raw)
In-Reply-To: <171016022562.644.8257823941386335046@wrigleys.postgresql.org>
References: <171016022562.644.8257823941386335046@wrigleys.postgresql.org>

On Mon, 2024-03-11 at 12:30 +0000, PG Doc comments form wrote:
> While reading the following section in the documentation
> https://www.postgresql.org/docs/current/runtime-config-query.html#GUC-RANDOM-PAGE-COST
> I found something which looks incorrect to me.
> 
> If I understand this setting correctly, the following sentence:
> 
> "Reducing this value relative to seq_page_cost will cause the system to
> prefer index scans; raising it will make index scans look relatively more
> expensive."
> 
> should rather be:
> 
> "Raising this value relative to seq_page_cost will cause the system to
> prefer index scans; reducing it will make index scans look relatively more
> expensive."

The documentation is correct.  If the cost of a random I/O operation is
higher, index scans look more expensive, because they perform random I/O.

Yours,
Laurenz Albe





view thread (3+ messages)  latest in thread

Message-ID: <b02831241a9285888c63c80cf9ea4a493aaefc58.camel@cybertec.at>
Permalink:  ../b02831241a9285888c63c80cf9ea4a493aaefc58.camel@cybertec.at/
Also on:    postgresql.org/message-id/b02831241a9285888c63c80cf9ea4a493aaefc58.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: laurenz.albe@cybertec.at, ignacio.alonso@microsoft.com, pgsql-docs@lists.postgresql.org
  Subject: Re: Definition of random_page_cost seems to invert correlation of that setting and seq_page_cost
  In-Reply-To: <b02831241a9285888c63c80cf9ea4a493aaefc58.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox