postgresguide.com
postgresguide.com copied to clipboard
Index cache hit rate SQL is incorrect
SELECT sum(idx_blks_read) as idx_read, sum(idx_blks_hit) as idx_hit, sum(idx_blks_hit) - sum(idx_blks_read)) sum(idx_blks_hit) as ratio FROM pg_statio_user_indexes;