Thread: random-page-cost

random-page-cost

From
PG Doc comments form
Date:
The following documentation comment has been logged on the website:

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

Two comments on random-page-cost parameter here
https://www.postgresql.org/docs/current/runtime-config-query.html#GUC-RANDOM-PAGE-COST


1) Adding a paragraph reminding us what random-access really mean in
postgres would be extremely valuable. I find the first paragraph from the
index - only scan section perfect. "This means that in an ordinary index
scan, each row retrieval requires fetching data from both the index and the
heap. Furthermore, while the index entries that match a given indexable
WHERE condition are usually close together in the index, the table rows they
reference might be anywhere in the heap. The heap-access portion of an index
scan thus involves a lot of random access into the heap, which can be slow,
particularly on traditional rotating media. " 

2) A question, based on the definition of what random-access mean in
postgres (hits to the heap) does the random-page-cost affect index-only and
covering index scans at all? (assume zero heap fetches from hints etc.)? if
no can we also add a note there.

thank you!
Hussein