April 2018
Intermediate to advanced
508 pages
15h 22m
English
Many of the same pieces of data available at the table level are also summarized per database. You can get the following information out of pg_stat_database and use it in similar ways to pg_stat_user_tables and pg_statio_user_tables:
SELECT datname,blks_read,blks_hit,tup_returned,tup_fetched,tup_inserted ,tup_updated,tup_deleted FROM pg_stat_database;
In addition, there are some useful transaction commit statistics available, as well as a count of the total active client backend connections active for each database:
SELECT datname,numbackends,xact_commit,xact_rollback from pg_stat_database;
Read now
Unlock full access