选择 打开 改范围 完整检索页

pgsql.cc 提供对 postgresql.org 官网内容的中文翻译,由 Pigsty 团队维护。

文档 / 系统目录 / 统计视图

STATISTICS VIEW统计视图

pg_stat_xact_user_tables

和pg_stat_xact_all_tables一样,但只显示用户表。

统计视图 引入 9.1 现存至 20 devel 1 次结构变更

类别
统计视图
关系 OID
12170
关系类型
v(视图)
字段数
12
引入版本
9.1
版本状态
当前稳定版
结构变更
1 次

PostgreSQL 18 手册 官方文档 源码定义

版本轨迹

相对 PostgreSQL 17 无变化。

Same as pg_stat_xact_all_tables, except that only user tables are shown.

字段

PostgreSQL 18 的 12 个字段,按定义顺序排列。说明默认用本站手册的译文,没有译文的按英文原文显示。

字段 类型 说明
relid oid 表的OID沿用
schemaname name 该表所在的模式的名称沿用
relname name 这个表的名称沿用
seq_scan bigint Number of sequential scans initiated on this table This view reports counters for the current transaction.EN
seq_tup_read bigint Number of live rows fetched by sequential scans This view reports counters for the current transaction.EN
idx_scan bigint Number of index scans initiated on this table This view reports counters for the current transaction.EN
idx_tup_fetch bigint Number of live rows fetched by index scans This view reports counters for the current transaction.EN
n_tup_ins bigint Total number of rows inserted This view reports counters for the current transaction.EN
n_tup_upd bigint Total number of rows updated. (This includes row updates counted in n_tup_hot_upd and n_tup_newpage_upd, and remaining non-HOT updates.) This view reports counters for the current transaction.EN
n_tup_del bigint Total number of rows deleted This view reports counters for the current transaction.EN
n_tup_hot_upd bigint Number of rows HOT updated. These are updates where no successor versions are required in indexes. This view reports counters for the current transaction.EN
n_tup_newpage_upd bigint Number of rows updated where the successor version goes onto a new heap page, leaving behind an original version with a t_ctid field that points to a different heap page. These are always non-HOT updates. This view reports counters for the current transaction.EN

演化历史

相邻两个大版本之间的差异,新的在前。版本号链到该版的字段表。

  1. PostgreSQL 16 ← 15 结构变更

    n_tup_newpage_upd

    4 处描述更新
    • n_tup_del Number of rows deleted This view reports counters for the current transaction. Total number of rows deleted This view reports counters for the current transaction.
    • n_tup_hot_upd Number of rows HOT updated (i.e., with no separate index update required) This view reports counters for the current transaction. Number of rows HOT updated. These are updates where no successor versions are required in indexes. This view reports counters for the current transaction.
    • n_tup_ins Number of rows inserted This view reports counters for the current transaction. Total number of rows inserted This view reports counters for the current transaction.
    • n_tup_upd Number of rows updated (includes HOT updated rows) This view reports counters for the current transaction. Total number of rows updated. (This includes row updates counted in n_tup_hot_upd and n_tup_newpage_upd, and remaining non-HOT updates.) This view reports counters for the current transaction.
  2. PostgreSQL 9.5 ← 9.4 仅描述更新

    1 处描述更新
    • n_tup_upd Number of rows updated This view reports counters for the current transaction. Number of rows updated (includes HOT updated rows) This view reports counters for the current transaction.
  3. PostgreSQL 9.2 ← 9.1 仅描述更新

    关系说明更新

    11 处描述更新
    • idx_scan Number of index scans initiated on this table This view reports counters for the current transaction.
    • idx_tup_fetch Number of live rows fetched by index scans This view reports counters for the current transaction.
    • n_tup_del Number of rows deleted This view reports counters for the current transaction.
    • n_tup_hot_upd Number of rows HOT updated (i.e., with no separate index update required) This view reports counters for the current transaction.
    • n_tup_ins Number of rows inserted This view reports counters for the current transaction.
    • n_tup_upd Number of rows updated This view reports counters for the current transaction.
    • relid OID of a table
    • relname Name of this table
    • schemaname Name of the schema that this table is in
    • seq_scan Number of sequential scans initiated on this table This view reports counters for the current transaction.
    • seq_tup_read Number of live rows fetched by sequential scans This view reports counters for the current transaction.
  4. PostgreSQL 9.1 ← 9.0 新增此关系

    共 11 个字段

字段矩阵

每个字段在 17 个收录版本里的存在情况;方格指向该版的字段表。「有变」指类型、可空、隐式或数组维数与上一版不同。

存在 有变 已移除 不存在

字段 9.19.29.39.49.59.61011121314151617181920
relid 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
schemaname 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
relname 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
seq_scan 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
seq_tup_read 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
idx_scan 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
idx_tup_fetch 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
n_tup_ins 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
n_tup_upd 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
n_tup_del 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
n_tup_hot_upd 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
n_tup_newpage_upd 不存在 不存在 不存在 不存在 不存在 不存在 不存在 不存在 不存在 不存在 不存在 不存在 存在 存在 存在 存在 存在

同类关系

关系 引入 字段 版本变动 最近变更
STATISTICS VIEW 统计视图 41 个
pg_stat_activity 9.0基线 22 147 次
每个服务器进程一行,显示与该进程当前活动相关的信息,例如状态和当前查询。有关详细信息,请参阅pg_stat_activity。 现存
pg_stat_all_indexes 9.0基线 10 192 次
当前数据库中的每个索引一行,显示有关访问该特定索引的统计信息。有关详细信息,请参阅pg_stat_all_indexes。 现存
pg_stat_all_tables 9.0基线 31 196 次
当前数据库中每个表一行,显示有关访问指定表的统计信息。详见 pg_stat_all_tables。 现存
pg_stat_archiver 9.4 7
只有一行,显示有关 WAL 归档进程活动的信息。有关详细信息,请参阅pg_stat_archiver。 现存
pg_stat_autovacuum_scores 19 12
当前数据库中的每个表一行,显示该表当前的自动清理评分。有关详细信息,请参阅pg_stat_autovacuum_scores。 现存
pg_stat_bgwriter 9.0基线 4 173 次
只有一行,显示有关后台写入器活动的信息。有关详细信息,请参阅pg_stat_bgwriter。 现存
pg_stat_checkpointer 17 11 181 次
只有一行,显示有关检查点进程活动的信息。有关详细信息,请参阅pg_stat_checkpointer。 现存
pg_stat_database 9.0基线 30 185 次
每个数据库一行,显示数据库范围的统计信息。有关详细信息,请参阅pg_stat_database。 现存
pg_stat_database_conflicts 9.1 9 192 次
每个数据库一行,显示数据库范围内因备库上的恢复冲突而导致查询被取消的统计信息。有关详细信息,请参阅pg_stat_database_conflicts。 现存
pg_stat_gssapi 12 5 161 次
每个连接(常规连接和复制连接)一行,显示有关该连接上使用的 GSSAPI 认证和加密的信息。有关详细信息,请参阅pg_stat_gssapi。 现存
pg_stat_io 16 20 181 次
对于每种后端类型、上下文和目标对象的组合各有一行,包含集簇范围的 I/O 统计信息。有关详细信息,请参阅pg_stat_io。 现存
pg_stat_kind_info 20 7
每个已注册的统计信息类型一行,显示各类型的信息。详见pg_stat_kind_info。 现存
pg_stat_lock 19 5
每种锁类型一行,显示集簇范围的锁统计信息。有关详细信息,请参阅pg_stat_lock。 现存
pg_stat_recovery 19 9
至多一行,显示有关恢复状态的统计信息。有关详细信息,请参阅pg_stat_recovery。 现存
pg_stat_recovery_prefetch 15 10
只有一行,显示了恢复过程中预取的块的统计信息。 详细信息请参见 pg_stat_recovery_prefetch。 现存
pg_stat_replication 9.1 20 124 次
每个 WAL 发送进程一行,显示有关复制到该发送进程所连接备库的统计信息。有关详细信息,请参阅pg_stat_replication。 现存
pg_stat_replication_slots 14 13 191 次
每个复制槽一行,显示有关复制槽使用情况的统计信息。有关详细信息,请参阅pg_stat_replication_slots。 现存
pg_stat_slru 13 9
每个 SLRU 一行,显示操作统计信息。有关详细信息,请参阅pg_stat_slru。 现存
pg_stat_ssl 9.5 8 142 次
每个连接(常规连接和复制连接)一行,显示有关该连接上使用的 SSL 的信息。有关详细信息,请参阅pg_stat_ssl。 现存
pg_stat_subscription 10 11 172 次
每个订阅至少一行,显示有关订阅工作进程的信息。有关详细信息,请参阅pg_stat_subscription。 现存
pg_stat_subscription_stats 15 14 192 次
每个订阅一行,显示有关错误和冲突的统计信息。有关详细信息,请参阅pg_stat_subscription_stats。 现存
pg_stat_sys_indexes 9.0基线 10 192 次
和pg_stat_all_indexes一样,但只显示系统表上的索引。 现存
pg_stat_sys_tables 9.0基线 31 196 次
和pg_stat_all_tables一样,但只显示系统表。 现存
pg_stat_user_functions 9.0基线 7 192 次
每个被跟踪的函数一行,显示有关该函数执行的统计信息。有关详细信息,请参阅pg_stat_user_functions。 现存
pg_stat_user_indexes 9.0基线 10 192 次
和pg_stat_all_indexes一样,但只显示用户表上的索引。 现存
pg_stat_user_tables 9.0基线 31 196 次
和pg_stat_all_tables一样,但只显示用户表。 现存
pg_stat_wal 14 6 192 次
只有一行,显示有关 WAL 活动的统计信息。有关详细信息,请参阅pg_stat_wal。 现存
pg_stat_wal_receiver 9.6 15 132 次
只有一行,显示有关 WAL 接收进程从其连接服务器接收到的统计信息。有关详细信息,请参阅pg_stat_wal_receiver。 现存
pg_stat_xact_all_tables 9.1 12 161 次
和pg_stat_all_tables相似,但计数动作只在当前事务内发生(还没有被包括在pg_stat_all_tables和相关视图中)。用于生存和死亡行数量的列以及清理和分析动作在此视图中不出现。 现存
pg_stat_xact_sys_tables 9.1 12 161 次
和pg_stat_xact_all_tables一样,但只显示系统表。 现存
pg_stat_xact_user_functions 9.1 6 9.21 次
和pg_stat_user_functions相似,但是只统计在当前事务期间的调用(还没有被包括在pg_stat_user_functions中)。 现存
pg_stat_xact_user_tables 9.1 12 161 次
和pg_stat_xact_all_tables一样,但只显示用户表。 现存
pg_statio_all_indexes 9.0基线 8 191 次
当前数据库中的每个索引一行,显示有关访问该特定索引的 I/O 统计信息。有关详细信息,请参阅pg_statio_all_indexes。 现存
pg_statio_all_sequences 9.0基线 6 191 次
当前数据库中的每个序列一行,显示有关访问该特定序列的 I/O 统计信息。有关详细信息,请参阅pg_statio_all_sequences。 现存
pg_statio_all_tables 9.0基线 12 191 次
当前数据库中的每个表一行,显示有关访问该特定表的 I/O 统计信息。有关详细信息,请参阅pg_statio_all_tables。 现存
pg_statio_sys_indexes 9.0基线 8 191 次
和pg_statio_all_indexes一样,但只显示系统表上的索引。 现存
pg_statio_sys_sequences 9.0基线 6 191 次
和pg_statio_all_sequences一样,但只显示系统序列(目前没有定义系统序列,因此这个视图总是为空)。 现存
pg_statio_sys_tables 9.0基线 12 191 次
和pg_statio_all_tables一样,但只显示系统表。 现存
pg_statio_user_indexes 9.0基线 8 191 次
和pg_statio_all_indexes一样,但只显示用户表上的索引。 现存
pg_statio_user_sequences 9.0基线 6 191 次
和pg_statio_all_sequences一样,但只显示用户序列。 现存
pg_statio_user_tables 9.0基线 12 191 次
和pg_statio_all_tables一样,但只显示用户表。 现存