Hacker News

mlyle said 5 days ago:

I wonder if there's any effort to use information like this in planning/query costing.

ants_a said 5 days ago:

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 said 4 days ago:

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