Some more thoughts on random_page_cost (vondra.me)

19 pointsby blueshoess5 days ago1 comment

nopurpose a day ago

> a sequential scan may push ~100GB of other data from memory (shared buffers or page cache).

Small note, if I remember correctly PostgreSQL allocates small buffer within shared_buffers for bulk reads. It is so that single sequential scan won't flush all of shared buffers content.

Similar mechanism exists for a pagecache implementation on Linux. It is divided into generations based on access patterns.