Updated on 2024-06-03 GMT+08:00

SUMMARY_STAT_DATABASE

Displays the summary of the status information about each database node in the cluster. It is used on CNs. The status information of each node in the database is summed up by database name. The timestamp column is not summed up and only the latest value of this column on all nodes is used, as described in Table 1.

Table 1 SUMMARY_STAT_DATABASE columns

Name

Type

Description

datname

name

Database name.

numbackends

bigint

Number of backends currently connected to this database.

xact_commit

numeric

Number of transactions in this database that have been committed.

xact_rollback

numeric

Number of transactions in this database that have been rolled back.

blks_read

numeric

Number of disk blocks read in this database.

blks_hit

numeric

Number of disk blocks that have been hit in the cache. In this case, data does not need to be read from disks. (The cache includes only the buffer cache and does not include the file system cache of the OS.)

tup_returned

numeric

Number of live rows fetched by sequential scans and number of index rows returned by index scans in the database.

tup_fetched

numeric

Number of rows returned by the current database through indexes.

tup_inserted

bigint

Number of rows inserted.

tup_updated

bigint

Number of rows updated.

tup_deleted

bigint

Number of rows deleted.

conflicts

bigint

Number of queries canceled due to conflicts with database replay (conflicts occur only on the standby node). For details, see STAT_DATABASE_CONFLICTS.

temp_files

numeric

Number of temporary files created by queries in this database. All temporary files are counted, which is not affected by the value of the GUC parameter log_temp_files.

temp_bytes

numeric

Total amount of data written to temporary files by queries in this database. All temporary files are counted, which is not affected by the value of the GUC parameter log_temp_files.

deadlocks

bigint

Number of deadlocks detected in this database.

blk_read_time

double precision

Time spent reading data file blocks by backends in this database (unit: ms).

blk_write_time

double precision

Time spent in writing data file blocks by backends in this database (unit: ms).

stats_reset

timestamp with time zone

Time at which the current statistics were reset.