Re: [EXTERNAL] Re: Definition of random_page_cost seems to invert correlation of that setting and seq_page_cost

From: Nacho Alonso Portillo <Ignacio(dot)Alonso(at)microsoft(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: [EXTERNAL] Re: Definition of random_page_cost seems to invert correlation of that setting and seq_page_cost
Date: 2024-03-13 15:21:39
Message-ID: GV1PR83MB0617FE1C99B035E4A0A9A7A09B2A2@GV1PR83MB0617.EURPRD83.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

My bad. Misunderstood this when I read it. It's completely correct the way it is.

Thanks,
Nacho
________________________________
From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Sent: Wednesday, March 13, 2024 2:06 PM
To: Nacho Alonso Portillo <Ignacio(dot)Alonso(at)microsoft(dot)com>; pgsql-docs(at)lists(dot)postgresql(dot)org <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: [EXTERNAL] Re: Definition of random_page_cost seems to invert correlation of that setting and seq_page_cost

[You don't often get email from laurenz(dot)albe(at)cybertec(dot)at(dot) Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

On Mon, 2024-03-11 at 12:30 +0000, PG Doc comments form wrote:
> While reading the following section in the documentation
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.postgresql.org%2Fdocs%2Fcurrent%2Fruntime-config-query.html%23GUC-RANDOM-PAGE-COST&data=05%7C02%7Cignacio.alonso%40microsoft.com%7Cd97db203bd0749e7fb6008dc435e6cfc%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638459320060756532%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=oBLi%2FJJPxpSmzEYmy8adBFZjSHJWq%2F6OIP%2BEvR25Vsk%3D&reserved=0<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

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2024-03-14 00:16:07 Locking
Previous Message Nacho Alonso Portillo 2024-03-13 15:19:52 Re: [EXTERNAL] Re: Incomplete sentence in the description for most_common_freqs