From e2b100dff0eb8cc18e4d28431dc7e123ed6a28cc Mon Sep 17 00:00:00 2001 From: jsmith Date: Wed, 4 May 2022 14:53:20 +0000 Subject: [PATCH] Add 'PostgreSQL/description/index_in_cache.sql' --- PostgreSQL/description/index_in_cache.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 PostgreSQL/description/index_in_cache.sql diff --git a/PostgreSQL/description/index_in_cache.sql b/PostgreSQL/description/index_in_cache.sql new file mode 100644 index 0000000..62359bc --- /dev/null +++ b/PostgreSQL/description/index_in_cache.sql @@ -0,0 +1,2 @@ +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;