pg_stat_xact_user_tables
是一个 统计视图,显示在当前事务期间对当前数据库中每个用户表的访问统计信息。
pg_stat_xact_user_tables
在 PostgreSQL 9.1 中添加。
按PostgreSQL版本定义
pg_stat_xact_user_tables (PostgreSQL 17)
View "pg_catalog.pg_stat_xact_user_tables" Column | Type | Collation | Nullable | Default -------------------+--------+-----------+----------+--------- relid | oid | | | schemaname | name | | | relname | name | | | seq_scan | bigint | | | seq_tup_read | bigint | | | idx_scan | bigint | | | idx_tup_fetch | bigint | | | n_tup_ins | bigint | | | n_tup_upd | bigint | | | n_tup_del | bigint | | | n_tup_hot_upd | bigint | | | n_tup_newpage_upd | bigint | | |
pg_stat_xact_user_tables (PostgreSQL 16)
View "pg_catalog.pg_stat_xact_user_tables" Column | Type | Collation | Nullable | Default -------------------+--------+-----------+----------+--------- relid | oid | | | schemaname | name | | | relname | name | | | seq_scan | bigint | | | seq_tup_read | bigint | | | idx_scan | bigint | | | idx_tup_fetch | bigint | | | n_tup_ins | bigint | | | n_tup_upd | bigint | | | n_tup_del | bigint | | | n_tup_hot_upd | bigint | | | n_tup_newpage_upd | bigint | | |
pg_stat_xact_user_tables (PostgreSQL 15)
View "pg_catalog.pg_stat_xact_user_tables" Column | Type | Collation | Nullable | Default ---------------+--------+-----------+----------+--------- relid | oid | | | schemaname | name | | | relname | name | | | seq_scan | bigint | | | seq_tup_read | bigint | | | idx_scan | bigint | | | idx_tup_fetch | bigint | | | n_tup_ins | bigint | | | n_tup_upd | bigint | | | n_tup_del | bigint | | | n_tup_hot_upd | bigint | | |
pg_stat_xact_user_tables (PostgreSQL 14)
View "pg_catalog.pg_stat_xact_user_tables" Column | Type | Collation | Nullable | Default ---------------+--------+-----------+----------+--------- relid | oid | | | schemaname | name | | | relname | name | | | seq_scan | bigint | | | seq_tup_read | bigint | | | idx_scan | bigint | | | idx_tup_fetch | bigint | | | n_tup_ins | bigint | | | n_tup_upd | bigint | | | n_tup_del | bigint | | | n_tup_hot_upd | bigint | | |
pg_stat_xact_user_tables (PostgreSQL 13)
View "pg_catalog.pg_stat_xact_user_tables" Column | Type | Collation | Nullable | Default ---------------+--------+-----------+----------+--------- relid | oid | | | schemaname | name | | | relname | name | | | seq_scan | bigint | | | seq_tup_read | bigint | | | idx_scan | bigint | | | idx_tup_fetch | bigint | | | n_tup_ins | bigint | | | n_tup_upd | bigint | | | n_tup_del | bigint | | | n_tup_hot_upd | bigint | | |
pg_stat_xact_user_tables (PostgreSQL 12)
View "pg_catalog.pg_stat_xact_user_tables" Column | Type | Collation | Nullable | Default ---------------+--------+-----------+----------+--------- relid | oid | | | schemaname | name | | | relname | name | | | seq_scan | bigint | | | seq_tup_read | bigint | | | idx_scan | bigint | | | idx_tup_fetch | bigint | | | n_tup_ins | bigint | | | n_tup_upd | bigint | | | n_tup_del | bigint | | | n_tup_hot_upd | bigint | | |
pg_stat_xact_user_tables (PostgreSQL 11)
View "pg_catalog.pg_stat_xact_user_tables" Column | Type | Collation | Nullable | Default ---------------+--------+-----------+----------+--------- relid | oid | | | schemaname | name | | | relname | name | | | seq_scan | bigint | | | seq_tup_read | bigint | | | idx_scan | bigint | | | idx_tup_fetch | bigint | | | n_tup_ins | bigint | | | n_tup_upd | bigint | | | n_tup_del | bigint | | | n_tup_hot_upd | bigint | | |
pg_stat_xact_user_tables (PostgreSQL 10)
View "pg_catalog.pg_stat_xact_user_tables" Column | Type | Collation | Nullable | Default ---------------+--------+-----------+----------+--------- relid | oid | | | schemaname | name | | | relname | name | | | seq_scan | bigint | | | seq_tup_read | bigint | | | idx_scan | bigint | | | idx_tup_fetch | bigint | | | n_tup_ins | bigint | | | n_tup_upd | bigint | | | n_tup_del | bigint | | | n_tup_hot_upd | bigint | | |
pg_stat_xact_user_tables (PostgreSQL 9.6)
View "pg_catalog.pg_stat_xact_user_tables" Column | Type | Modifiers ---------------+--------+----------- relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint | n_tup_hot_upd | bigint |
pg_stat_xact_user_tables (PostgreSQL 9.5)
View "pg_catalog.pg_stat_xact_user_tables" Column | Type | Modifiers ---------------+--------+----------- relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint | n_tup_hot_upd | bigint |
pg_stat_xact_user_tables (PostgreSQL 9.4)
View "pg_catalog.pg_stat_xact_user_tables" Column | Type | Modifiers ---------------+--------+----------- relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint | n_tup_hot_upd | bigint |
pg_stat_xact_user_tables (PostgreSQL 9.3)
View "pg_catalog.pg_stat_xact_user_tables" Column | Type | Modifiers ---------------+--------+----------- relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint | n_tup_hot_upd | bigint |
pg_stat_xact_user_tables (PostgreSQL 9.2)
View "pg_catalog.pg_stat_xact_user_tables" Column | Type | Modifiers ---------------+--------+----------- relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint | n_tup_hot_upd | bigint |
pg_stat_xact_user_tables (PostgreSQL 9.1)
View "pg_catalog.pg_stat_xact_user_tables" Column | Type | Modifiers ---------------+--------+----------- relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint | n_tup_hot_upd | bigint |
变更历史
- PostgreSQL 9.1
- 添加 (提交 46aa77c7)
参考文献
- PostgreSQL 文档: pg_stat_xact_user_tables