Created
January 31, 2021 04:25
-
-
Save StevenJL/185c362374f7d02cf3cc97749124d5be to your computer and use it in GitHub Desktop.
Cache Hit Ratio for psql table
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 | |
(heap_blks_hit::decimal / (heap_blks_hit + heap_blks_read)) as cache_hit_ratio | |
FROM | |
pg_statio_user_tables | |
WHERE relname = 'large_table'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment