
PgFincore – A set of functions to manage pages in memory from PostgreSQL - turrini
https://github.com/klando/pgfincore
======
mlyle
I wonder if there's any effort to use information like this in planning/query
costing.

~~~
ants_a
Not really. One of the major complications is that considering an index
uncached might become a self fulfilling prophecy. Not using an index because
it isn't cached leads to the index never becoming cached, even if long term it
would be the better choice. In other cases the cached fraction might be tiny,
but it is the option being actively used.

~~~
mlyle
> Not using an index because it isn't cached ...

I'm more saying the opposite-- perhaps the real cost favors scanning the table
if it is already resident while the normal costing would heavily vote against
it based on the amount of disk access.

