On Apr 29, 2011, at 10:25 AM, James Mansion <james@mansionfamily.plus.com> wrote:
> Robert Haas wrote:
>> The server can and does measure hit rates for the PG buffer pool, but to my knowledge there is no clear-cut way for
PGto know whether read() is satisfied from the OS cache or a drive cache or the platter.
>>
>>
> Does the server know which IO it thinks is sequential, and which it thinks is random?
No. It models this in the optimizer, but the executor has no clue. And sometimes we model I/O as partly random, partly
sequential,as in the case of heap fetches on a clustered index. So the answer isn't even a Boolean.
...Robert