Difference between revisions of "Cache hit ratio"
Jump to navigation
Jump to search
(Created page with " * {{DBs}}") |
|||
Line 1: | Line 1: | ||
+ | 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]]; | ||
+ | |||
+ | == See also == | ||
* {{DBs}} | * {{DBs}} | ||
+ | |||
+ | [[Category:Databases]] |
Revision as of 09:19, 5 August 2021
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;
See also
- Databases: Database management, SQL, NoSQL, Wide column, PostgreSQL, MariaDB, MySQL, Derby DB, MongoDB, Cassandra, SQLite, HSQL2, H2, RocksDB, Microsoft SQL Server, DB2, Oracle Database, Memcached, Berkeley DB, Collation, SingleStore, Amazon Aurora, Graph database, Amazon DynamoDB, PrestoDB, Cache hit ratio, ACID, WAL, ARIES, DBMS, OLTP, OLAP, Database Schema, CockroachDB, Tables, Views, Apache Druid, RDMS
Advertising: