pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Definition of random_page_cost seems to invert correlation of that setting and seq_page_cost
3+ messages / 3 participants
[nested] [flat]

* Definition of random_page_cost seems to invert correlation of that setting and seq_page_cost
@ 2024-03-11 12:30 PG Doc comments form <noreply@postgresql.org>
  2024-03-13 13:06 ` Re: Definition of random_page_cost seems to invert correlation of that setting and seq_page_cost Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Doc comments form @ 2024-03-11 12:30 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: ignacio.alonso@microsoft.com

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/runtime-config-query.html
Description:

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."

Thanks,
Nacho


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Definition of random_page_cost seems to invert correlation of that setting and seq_page_cost
  2024-03-11 12:30 Definition of random_page_cost seems to invert correlation of that setting and seq_page_cost PG Doc comments form <noreply@postgresql.org>
@ 2024-03-13 13:06 ` Laurenz Albe <laurenz.albe@cybertec.at>
  2024-03-13 15:21   ` Re: [EXTERNAL] Re: Definition of random_page_cost seems to invert correlation of that setting and seq_page_cost Nacho Alonso Portillo <Ignacio.Alonso@microsoft.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Laurenz Albe @ 2024-03-13 13:06 UTC (permalink / raw)
  To: ignacio.alonso@microsoft.com; pgsql-docs@lists.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





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [EXTERNAL] Re: Definition of random_page_cost seems to invert correlation of that setting and seq_page_cost
  2024-03-11 12:30 Definition of random_page_cost seems to invert correlation of that setting and seq_page_cost PG Doc comments form <noreply@postgresql.org>
  2024-03-13 13:06 ` Re: Definition of random_page_cost seems to invert correlation of that setting and seq_page_cost Laurenz Albe <laurenz.albe@cybertec.at>
@ 2024-03-13 15:21   ` Nacho Alonso Portillo <Ignacio.Alonso@microsoft.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Nacho Alonso Portillo @ 2024-03-13 15:21 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

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

Thanks,
Nacho
________________________________
From: Laurenz Albe <laurenz.albe@cybertec.at>
Sent: Wednesday, March 13, 2024 2:06 PM
To: Nacho Alonso Portillo <Ignacio.Alonso@microsoft.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.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.albe@cybertec.at. 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%2Fcurren...;
> 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

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2024-03-13 15:21 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-03-11 12:30 Definition of random_page_cost seems to invert correlation of that setting and seq_page_cost PG Doc comments form <noreply@postgresql.org>
2024-03-13 13:06 ` Laurenz Albe <laurenz.albe@cybertec.at>
2024-03-13 15:21   ` Nacho Alonso Portillo <Ignacio.Alonso@microsoft.com>

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