Cache hit ratio

From wikieduonline
Revision as of 08:40, 10 August 2021 by Welcome (talk | contribs)
Jump to navigation Jump to search


PostgreSQL:

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;
heap_read  |   heap_hit   |         ratio
-------------+--------------+------------------------
 37201451186 | 256244644067 | 0.87322560501639635699
(1 row)
heap_read | heap_hit | ratio
-----------+----------+-------
           |          |
(1 row)

Related terms

See also

Advertising: