93 points | by camille_134 5 days ago
2 comments
For anyone curious, the corrected query:
SELECT sum(blks_hit)::numeric / nullif(sum(blks_hit + blks_read), 0) AS cache_hit_ratio FROM pg_stat_database;
And maybe something like HammerDB to check performances.
For anyone curious, the corrected query:
SELECT sum(blks_hit)::numeric / nullif(sum(blks_hit + blks_read), 0) AS cache_hit_ratio FROM pg_stat_database;
And maybe something like HammerDB to check performances.