Calculate the database cache hit ratio:

14 Nov 2015

select sum(blks_hit) * 100 / sum(blks_hit + blks_read) as hit_ratio from pg_stat_database;