select * from
(SELECT relname, heap_blks_read, heap_blks_hit,
round(heap_blks_hit::numeric/(heap_blks_hit + heap_blks_read), 3)
FROM pg_statio_user_tables
) as one WHERE heap_blks_read > 0 and relname not like '%bak%' and round<0.9 and round>0
ORDER BY relname ;
很多资料说这个缓存命中率不可低于99%,如果低于了99%,表明,cache效率太低了,需要增大shared buffer。总之了,当你的shared buffer命中率太低,比如60%,基本就需要检查下你配置的shared buffers是否太小了,导致你cache利用率如此之低。
相关连接:https://my.oschina.net/u/2381678/blog/601681
测试测试测试测试测试测试测试测试测试测试测试测试测试测试
48448
测试