Difference between revisions of "Cache hit ratio"
Jump to navigation
Jump to search
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
[[PostgreSQL]]: | [[PostgreSQL]]: | ||
− | SELECT | + | [[SELECT]] |
sum(heap_blks_read) as heap_read, | sum(heap_blks_read) as heap_read, | ||
sum(heap_blks_hit) as heap_hit, | sum(heap_blks_hit) as heap_hit, | ||
Line 9: | Line 9: | ||
FROM | FROM | ||
[[pg_statio_user_tables]]; | [[pg_statio_user_tables]]; | ||
+ | |||
+ | heap_read | heap_hit | ratio | ||
+ | -------------+--------------+------------------------ | ||
+ | 37201451186 | 256244644067 | 0.87322560501639635699 | ||
+ | (1 row) | ||
+ | |||
+ | heap_read | heap_hit | ratio | ||
+ | -----------+----------+------- | ||
+ | | | | ||
+ | (1 row) | ||
== Related terms == | == Related terms == | ||
Line 18: | Line 28: | ||
* {{SQL}} | * {{SQL}} | ||
* {{DBs}} | * {{DBs}} | ||
+ | * {{PostgreSQL}} | ||
[[Category:Databases]] | [[Category:Databases]] |
Latest revision as of 08:41, 10 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;
heap_read | heap_hit | ratio -------------+--------------+------------------------ 37201451186 | 256244644067 | 0.87322560501639635699 (1 row)
heap_read | heap_hit | ratio -----------+----------+------- | | (1 row)
Related terms[edit]
See also[edit]
- SQL, NewSQL, RDMS: GraphQL (2015), SQLite,
select, insert
,select count
, Distributed SQL, TablePlus, Cache hit ratio,pg_stat_user_tables
,EXPLAIN
, Index (PostgreSQL), DDL, SQL/MED, Group by, List users, SQL Injection, SQLAlchemy,CREATE USER, CREATE ROLE, EXPLAIN, ALTER DATABASE, REVOKE, NOLOCK, NOWAIT, EXISTS
, Unique constraint,.sql
- 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
- PostgreSQL:
pg_dump, pg_restore
,pgAdmin, pg_config, psql, pg_ctl, pg_isready, initdb
, Role, Schema, DBeaver, Navicat, DataGrip, OmniDB,Adminer
, docker-compose.xml PostgreSQL, PostgreSQL version, PostgreSQL logs,postgresql.conf
,pg_hba.conf, $HOME/.pg_service.conf
, Create database (PostgreSQL), Create user,createdb
,GRANT
,pg_stat
, PostgreSQL VACUUM, EXPLAIN,pg stat activity
, Autovacuum, ALTER DATABASE, PostgreSQL statistics collector, Shared buffers, EXPLAIN (PostgreSQL),EXPLAIN ANALYZE
, Bitmap scan,EXPLAIN VERBOSE
,EXPLAIN VERBOSE (PostgresSQL)
,WAL
,ALTER USER
,CREATE ROLE, CREATE USER
,\du
,show users
,\l
, The Statistics Collector, pganalyze,cron.schedule
, Master,pg_tables
, PostgreSQL replication,CREATE, SET
, TOAST, PgBouncer, Restore DB, Index, meta-commands, Table, foreign table, Schema, Sequence, Views, materialized view, Table Partitioning, monitoring, PostgreSQL System Administration Functions, PostgreSQL extension, privileges, logging, PGTune, PostgreSQL parameter tunning, PostgreSQL modules, pgbench, PostgreSQL users, catalogs
Advertising: