首批通过分布式安全可靠测评,为关键业务系统打造
常见统计事件说明
更新时间:2026-04-15 17:17:00
统计事件介绍
本节介绍存储在 V$SYSSTAT 视图中的一些统计事件信息。通过这些统计数据有助于识别和纠正性能问题。
V$SESSTAT 视图可以显示每个会话的统计事件信息。统计事件信息仅对当前连接的会话有效,当会话断开连接时,会话的所有统计事件信息都会在 V$SESSTAT 视图中更新:统计事件信息的值会被清除,下一个会话连接后产生新值。
许多统计事件与内部实现相关联,因此可能会有更改或删除,具体以实际情况为准。
查看统计事件
可在系统租户下通过 SQL 语句按字母顺序显示所有统计事件及其所属的统计事件类型。示例如下:
obclient> SELECT CLASS,STAT_ID,NAME FROM V$SYSSTAT;
常见统计事件
| 统计事件所属类型 | 统计事件 ID | 统计事件名称 | 描述 |
|---|---|---|---|
| 1 | 10000 | rpc packet in | 发送到本 OBServer 的 RPC Packet 累积数量 |
| 1 | 10001 | rpc packet in bytes | 发送到本 OBServer 的 RPC Packet 累积大小 |
| 1 | 10002 | rpc packet out | 本 OBServer 发出的 RPC Packet 的累积数量 |
| 1 | 10003 | rpc packet out bytes | 本 OBServer 发出的 RPC Packet 的累积大小 |
| 1 | 10005 | rpc net delay | RPC 从发送到被接受的累积延迟(不包括 Decode Packet 时间),单位为微秒 |
| 1 | 10006 | rpc net frame delay | RPC 从发送到被接收的累积延迟(包括 Decode Packet 时间),单位为微秒 |
| 2 | 20001 | request dequeue count | 租户队列 POP 成功的请求累积数量 |
| 2 | 20002 | request queue time | 请求排队的累积时间,单位为微秒 |
| 4 | 30000 | trans commit log sync time | Commit Log 同步多数派的总耗时,单位为微秒 |
| 4 | 30001 | trans commit log sync count | Commit Log 的总数量 |
| 4 | 30002 | trans commit log submit count | 事务总共提交的日志数量总和 |
| 4 | 30005 | trans start count | 开启事务的总数量 |
| 4 | 30006 | trans total used time | 事务执行的总耗时,单位为微秒 |
| 4 | 30009 | trans rollback count | 回滚事务的总数量 |
| 4 | 30010 | trans rollback time | 事务回滚的总耗时,单位为微秒 |
| 4 | 30200 | xa start total count | xa_start 语句总个数(包含成功的以及失败的) |
| 4 | 30201 | xa start total used time | xa_start 语句的总耗时(包含成功的以及失败的),单位为微秒 |
| 4 | 30202 | xa start with rpc total count | 远程 xa_start 语句的总个数(仅包含成功的) |
| 4 | 30203 | failed xa start total count | xa_start 语句失败的总个数 |
| 4 | 30204 | xa end total count | xa_end 语句的总个数(包含成功的与失败的) |
| 4 | 30205 | xa end total used count | xa_end 语句的总耗时(包含成功的与失败的),单位为微秒 |
| 4 | 30206 | xa end with rpc total count | 远程 xa_end 语句的总个数(仅包含成功的) |
| 4 | 30207 | failed xa end total count | xa_end 语句失败的总个数 |
| 4 | 30208 | xa prepare total count | xa_prepare 语句的总个数(包含成功的与失败的) |
| 4 | 30209 | xa prepare total used time | xa_prepare 语句的总耗时(包含成功的与失败的),单位为微秒 |
| 4 | 30210 | xa prepare with rpc total count | 远程 xa_prepare 语句的总个数(仅包含成功的) |
| 4 | 30211 | failed xa prepare total count | xa_prepare 语句失败的总个数 |
| 4 | 30212 | xa commit total count | xa_commit 语句的总个数(包含成功的与失败的) |
| 4 | 30213 | xa commit total used time | xa_commit 语句的总耗时(包含成功的与失败的),单位为微秒 |
| 4 | 30214 | xa commit with rpc total count | 远程 xa_commit 语句的总个数(仅包含成功的) |
| 4 | 30215 | failed xa commit total count | xa_commit 语句失败的总个数 |
| 4 | 30216 | xa rollback total count | xa_rollback 语句的总个数(包含成功的与失败的) |
| 4 | 30217 | xa rollback total used time | xa_rollback 语句的总耗时(包含成功的与失败的),单位为微秒 |
| 4 | 30218 | xa rollback with rpc total count | 远程 xa_rollback 语句的总个数(仅包含成功的) |
| 4 | 30219 | failed xa rollback total count | xa_rollback 语句失败的总个数 |
| 8 | 40000 | sql select count | SELECT 语句执行次数 |
| 8 | 40001 | sql select time | SELECT 语句执行总耗时,单位为微秒 |
| 8 | 40002 | sql insert count | INSERT 语句执行次数 |
| 8 | 40003 | sql insert time | INSERT 语句执行总耗时,单位为微秒 |
| 8 | 40004 | sql replace count | REPLACE 语句执行次数 |
| 8 | 40005 | sql replace time | REPLACE 语句执行总耗时,单位为微秒 |
| 8 | 40006 | sql update count | UPDATE 语句执行次数 |
| 8 | 40007 | sql update time | UPDATE 语句执行总耗时,单位为微秒 |
| 8 | 40008 | sql delete count | DELETE 语句执行次数 |
| 8 | 40009 | sql delete time | DELETE 语句执行总耗时,单位为微秒 |
| 8 | 40018 | sql other count | 其他语句执行次数 |
| 8 | 40019 | sql other time | 其他语句执行总耗时,单位为微秒 |
| 8 | 40020 | ps prepare count | PS 准备计数 |
| 8 | 40021 | ps prepare time | PS 准备耗时,单位为微秒 |
| 8 | 40022 | ps execute count | PS 执行计数 |
| 8 | 40023 | ps close count | PS 关闭计数 |
| 8 | 40024 | ps close time | PS 关闭耗时,单位为微秒 |
| 8 | 40025 | sql commit count | Commit 提交计数 |
| 8 | 40026 | sql commit time | Commit 提交时间,单位为微秒 |
| 8 | 40027 | sql rollback count | Rollback 回滚计数 |
| 8 | 40028 | sql rollback time | Rollback 回滚计数 |
| 8 | 40030 | opened cursors current | 当前启动的游标(OCP 使用其作为 Session 缓存的游标数) |
| 8 | 40031 | opened cursors cumulative | 开启游标的累计数 |
| 8 | 40010 | sql local count | LOCAL 语句执行次数 |
| 8 | 40011 | sql remote count | REMOTE 语句执行次数 |
| 8 | 40012 | sql distributed count | DISTRIBUTED 语句执行次数 |
| 8 | 40013 | active sessions | 活跃连接数 |
| 8 | 40014 | single query count | 单个查询的计数 |
| 8 | 40015 | multiple query count | 以 Multiple Query 协议发过来的语句总数 |
| 8 | 40016 | multiple query with one stmt count | 通过单个数据库语句执行多次查询的次数 |
| 8 | 40100 | sql inner select count | inner sql SELECT 语句执行次数 |
| 8 | 40101 | sql inner select time | inner sql SELECT 语句执行总耗时,单位为微秒 |
| 8 | 40102 | sql inner insert count | inner sql INSERT 语句执行次数 |
| 8 | 40103 | sql inner insert time | inner sql INSERT 语句执行总耗时,单位为微秒 |
| 8 | 40104 | sql inner replace count | inner sql REPLACE 语句执行次数 |
| 8 | 40105 | sql inner replace time | inner sql REPLACE 语句执行总耗时,单位为微秒 |
| 8 | 40106 | sql inner update count | inner sql UPDATE 语句执行次数 |
| 8 | 40107 | sql inner update time | inner sql UPDATE 语句执行总耗时,单位为微秒 |
| 8 | 40108 | sql inner delete count | inner sql DELETE 语句执行次数 |
| 8 | 40109 | sql inner delete time | inner sql DELETE 语句执行总耗时,单位为微秒 |
| 8 | 40110 | sql inner other count | inner sql OTHER 语句执行总耗时,单位为微秒 |
| 8 | 40111 | sql inner other time | inner sql OTHER 语句执行总耗时,单位为微秒 |
| 8 | 40112 | user logons cumulative | 用户登录累计 |
| 8 | 40113 | user logouts cumulative | 用户退出累计 |
| 8 | 40114 | user logons failed cumulative | 用户登录失败累计数 |
| 8 | 40115 | user logons time cumulative | 用户登录用时累计 |
| 8 | 40116 | sql local execute time | 本地数据库节点执行 SQL 查询的耗时,单位为微秒 |
| 8 | 40117 | sql remote execute time | 在远程节点执行 SQL 查询的耗时,单位为微秒 |
| 8 | 40118 | sql distributed execute time | 布式事务或跨多节点协同执行 SQL 的总耗时,单位为微秒 |
| 8 | 40119 | sql fail count | SQL 执行失败的次数 |
| 8 | 40120 | inner sql local count | 内部生成的本地 SQL 执行次数 |
| 8 | 40121 | inner sql remote count | 内部生成的需远程执行的 SQL 次数 |
| 8 | 40122 | inner sql distributed count | 内部生成的需分布式协同执行的 SQL 次数 |
| 16 | 50000 | row cache hit | 行缓存命中次数 |
| 16 | 50001 | row cache miss | 行缓存 miss 次数 |
| 16 | 50008 | block cache hit | 微块缓存命中次数 |
| 16 | 50009 | block cache miss | 微块缓存 miss 次数 |
| 32 | 60000 | io read count | 读 I/O 次数 |
| 32 | 60001 | io read delay | 读 I/O 延时,单位为微秒 |
| 32 | 60002 | io read bytes | 读 I/O 涉及数据大小 |
| 32 | 60003 | io write count | 写 I/O 次数 |
| 32 | 60004 | io write delay | 写 I/O 延时,单位为微秒 |
| 32 | 60005 | io write bytes | 写 I/O 涉及数据大小 |
| 32 | 60012 | memstore apply count | MemTable 执行写入操作的次数 |
| 32 | 60013 | memstore apply succ count | MemTable 执行写入操作成功的次数 |
| 32 | 60014 | memstore apply fail count | MemTable 执行写入操作失败的次数 |
| 32 | 60019 | memstore read lock succ count | 在行上执行快照读检查成功的次数 |
| 32 | 60020 | memstore read lock fail count | 在行上执行快照读检查失败的次数 |
| 32 | 60021 | memstore write lock succ count | 加行锁成功的次数 |
| 32 | 60022 | memstore write lock fail count | 加行锁失败的次数 |
| 32 | 60023 | memstore wait write lock time | 等待行锁的时长,单位为微秒 |
| 32 | 60024 | memstore wait read lock time | 等待快照读的时长,单位为微秒 |
| 32 | 60031 | storage read row count | 存储读取行数 |
| 32 | 60039 | io read queue delay | 读 I/O 队列延时,单位为微秒 |
| 32 | 60057 | ssstore read row count | SSTable 读取行数 |
| 32 | 69012 | backup io read delay | 备份读 I/O 接口调用时延,单位为微秒 |
| 32 | 69013 | backup io write delay | 备份写 I/O 接口调用时延,单位为微秒 |
| 32 | 130000 | active memstore used | 活跃 MemTable 的内存占用(可能偏大) |
| 32 | 130001 | total memstore used | 总 MemTable 的内存占用 |
| 32 | 130002 | major freeze trigger | MemTable 触发冻结的内存限制 |
| 32 | 130004 | memstore limit | MemTable 总共能够使用的内存 |
| 64 | 140002 | max memory size | 对应租户内存规格的 max_memory |
| 64 | 140003 | memory usage | 租户实际使用的总内存 |
| 64 | 140005 | max cpus | 租户 max_cpu * 100 |
| 64 | 140006 | cpu usage | 租户实际使用的 CPU * 100 |
| 256 | 80057 | clog trans log total size | MemTable mutator size 和 trans_header 之和 |
| 3072 | 200001 | DB time | 数据库活动的总时间,包括 CPU 和非空闲等待时间的累加值 |
| 3072 | 200002 | DB CPU | 数据库活动中 CPU 消耗的时间,单位为微秒 |
| 3072 | 200005 | background elapsed time | 后台进程执行的总时间,单位为微秒 |
| 3072 | 200006 | background cpu time | 后台进程消耗的 CPU 时间,单位为微秒 |
| 3072 | 200010 | non idle wait time | 非空闲等待的时间,即会话处于等待状态但不是空闲等待的总时间,单位为微秒 |
| 3072 | 200011 | idle wait time | 空闲等待的时间,即会话处于空闲等待状态的总时间,单位为微秒 |
| 3072 | 200012 | background database time | 后台进程执行数据库操作的总时间,单位为微秒 |
| 3072 | 200013 | background database non-idle wait time | 后台进程在非空闲等待状态下执行数据库操作的时间,单位为微秒 |
| 3072 | 200014 | background database idle wait time | 后台进程在空闲等待状态下执行数据库操作的时间,单位为微秒 |
| 3072 | 220001 | concurrency wait total time | 因并发问题导致的等待时间总和,例如由于资源锁定而等待的时间,单位为微秒 |
| 3072 | 220002 | user io wait total time | 用户进程在等待 I/O 操作(如读取数据或写入数据到磁盘)完成的总时间,单位为微秒 |
| 3072 | 220003 | application wait total time | 由用户应用程序代码产生的等待时间总和(例如,由行级锁定或显式锁定命令引起的锁等待),单位为微秒 |