Created
January 26, 2023 15:09
-
-
Save mowings/7731b901765fd48424757b457d4f4257 to your computer and use it in GitHub Desktop.
Postgresql Cache hit ratio query
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 cache_hit_ratio | |
FROM pg_statio_user_tables; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment