diff --git a/init.rb b/init.rb index 35ab9a9..07f1ebd 100644 --- a/init.rb +++ b/init.rb @@ -2,8 +2,12 @@ class Heroku::Command::Pg < Heroku::Command::Base - def cache - sql = %q(SELECT + def cachehit + # pg:cachehit + # + # see your cache hit rate for your database (effective databases are at 99% and up) + # + sql = %q(SELECT to_char((sum(idx_blks_hit) - sum(idx_blks_read)) / sum(idx_blks_hit), '99.99') as cache_hit_rate FROM pg_statio_user_indexes)