From e1ce32f96ba8d152e9d96a5b7731a24d868280d0 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 5 Aug 2020 15:27:40 +0100 Subject: [PATCH] updated postgres_cache_hit_ratio.sql --- sql/postgres_cache_hit_ratio.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/postgres_cache_hit_ratio.sql b/sql/postgres_cache_hit_ratio.sql index 25d40f45..260866e1 100644 --- a/sql/postgres_cache_hit_ratio.sql +++ b/sql/postgres_cache_hit_ratio.sql @@ -13,7 +13,7 @@ -- https://www.linkedin.com/in/harisekhon -- --- PostgreSQL Cache-hit ratio (should be closer to 1, eg. 0.99) +-- PostgreSQL Tables Cache-hit ratio (should be closer to 1, eg. 0.99) SELECT SUM(heap_blks_read) AS heap_read, @@ -21,4 +21,5 @@ SELECT SUM(heap_blks_hit) / (SUM(heap_blks_hit) + SUM(heap_blks_read)) AS ratio -FROM pg_statio_user_tables; +FROM + pg_statio_user_tables;