-
-
Save fjsj/2787f67ac1161b259521f1c0c51c63bb to your computer and use it in GitHub Desktop.
Ensure more than 0.99. See: https://pawelurbanek.com/postgresql-fix-performance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
sum(heap_blks_read) as heap_read, | |
sum(heap_blks_hit) as heap_hit, | |
sum(heap_blks_hit) / (sum(heap_blks_hit) + sum(heap_blks_read)) as ratio | |
FROM | |
pg_statio_user_tables; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment