My bad. Misunderstood this when I read it. It's completely correct the way it is.
Thanks, Nacho ________________________________ From: Laurenz Albe <laurenz.a...@cybertec.at> Sent: Wednesday, March 13, 2024 2:06 PM To: Nacho Alonso Portillo <ignacio.alo...@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.a...@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%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