---
title: "GV$SESSTAT - OceanBase 数据库 V4.2.5 | OceanBase 文档中心"
description: "GV$SESSTAT 说明 该视图从 V1.4 版本开始引入。 功能描述 展示当前租户在当前 OBServer 节点上的 Session 级别的一些统计信息，其中， STATISTIC# 表示统计项编号，可以从 V$STATNAME 中查询到对应统计项编号的统计项名称及其含义。 字段说明 字段名称 类型 是否可以为 …"
---
切换语言

- 中文站 - 简体中文
- International - English
- 日本站 - 日本語

文档反馈![](https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*P8CuR4UJ_FkAAAAAAAAAAAAADiGDAQ/original) OceanBase 数据库分布式版 - V 4.2.5 LTS

# GV$SESSTAT

更新时间：2026-07-15 20:56:59

[编辑](https://github.com/oceanbase/oceanbase-doc/edit/V4.2.5/zh-CN/700.reference/700.system-views/500.system-view-of-oracle-mode/300.performance-view-of-oracle-mode/4900.gv-sesstat-of-oracle-mode.md)

#### 说明

该视图从 V1.4 版本开始引入。

## 功能描述

展示当前租户在当前 OBServer 节点上的 Session 级别的一些统计信息，其中，`STATISTIC#` 表示统计项编号，可以从 `V$STATNAME` 中查询到对应统计项编号的统计项名称及其含义。

## 字段说明

| **字段名称** | **类型** | **是否可以为 NULL** | **描述** |
| --- | --- | --- | --- |
| SID | NUMBER | NO | 对于 V4.2.x 版本：   - V4.2.5 BP4 之前版本：     在所有连接方式（直连模式/ODP 模式）下，该字段均表示 Server Session ID。 - V4.2.5 BP4 及之后版本：      - 在直连模式下：         该字段表示 Server Session ID。     - 在 ODP 模式下：        - 当 ODP 中的配置项 `client_session_id_version = 2` 时，该字段表示 Client Session ID。       - 当 `client_session_id_version = 1` 时，该字段表示 Server Session ID。 |
| CON_ID | NUMBER | NO | 租户 ID |
| SVR_IP | VARCHAR2(46) | NO | 服务器的 IP 地址 |
| SVR_PORT | NUMBER(38) | NO | 服务器端口号 |
| STATISTIC# | NUMBER | NO | 统计项编号 |
| VALUE | NUMBER | NO | 统计项值 |

## 查询示例

用户租户下，查看本租户在所有 OBServer 节点的 Session 级别的统计事件信息，展示前 10 条记录。

```shell
obclient [SYS]> SELECT * FROM SYS.GV$SESSTAT WHERE ROWNUM <= 10;

```

查询结果如下：

```shell
+----------------------+--------+----------------+----------+------------+-------+
| SID                  | CON_ID | SVR_IP         | SVR_PORT | STATISTIC# | VALUE |
+----------------------+--------+----------------+----------+------------+-------+
| -9223372036854723788 |   1004 | 11.xxx.xxx.xxx |    28825 |          0 |     0 |
| -9223372036854723788 |   1004 | 11.xxx.xxx.xxx |    28825 |          2 |     0 |
| -9223372036854723788 |   1004 | 11.xxx.xxx.xxx |    28825 |        129 |     0 |
| -9223372036854723788 |   1004 | 11.xxx.xxx.xxx |    28825 |        130 |     0 |
| -9223372036854723788 |   1004 | 11.xxx.xxx.xxx |    28825 |        161 |     0 |
| -9223372036854723788 |   1004 | 11.xxx.xxx.xxx |    28825 |        162 |     0 |
| -9223372036854723788 |   1004 | 11.xxx.xxx.xxx |    28825 |        163 |     0 |
| -9223372036854723788 |   1004 | 11.xxx.xxx.xxx |    28825 |        164 |     0 |
| -9223372036854723788 |   1004 | 11.xxx.xxx.xxx |    28825 |        165 |     0 |
| -9223372036854723788 |   1004 | 11.xxx.xxx.xxx |    28825 |        166 |     0 |
+----------------------+--------+----------------+----------+------------+-------+
10 rows in set

```

## 相关视图或文档

- 查看租户级别的统计事件信息：

     - [GV$SYSSTAT](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000001500640)
     - [V$SYSSTAT](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000001500658)
 - 查看租户所有统计事件的定义：[V$STATNAME](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000001500693)
 - 有关统计事件的详细说明，参见 [常见统计事件说明](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000001499699)。

 上一篇 下一篇 ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ)[AI](https://www.oceanbase.com/obi) 咨询热线
