---
title: "GV$SESSTAT - OceanBase 数据库 V4.4.1 | OceanBase 文档中心"
description: GV$SESSTAT 说明 该视图从 V1.4 版本开始引入。 功能描述 视图 GV$SESSTAT 用于展示所有 OBServer 节点的 Session 级别的统计事件信息。 字段说明 字段名称 类型 是否可以为 NULL 描述 SID bigint(20) NO 对于 V4.3.x 版本： V4.3.5 BP2…
---
切换语言

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

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

# GV$SESSTAT

更新时间：2025-11-01 09:07:41

[编辑](https://github.com/oceanbase/oceanbase-doc/edit/V4.4.1/zh-CN/700.reference/700.system-views/300.system-view-of-sys-tenant/300.performance-view-of-sys-tenant/5300.gv-sesstat-of-sys-tenant.md)

#### 说明

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

## 功能描述

视图 `GV$SESSTAT` 用于展示所有 OBServer 节点的 Session 级别的统计事件信息。

## 字段说明

| **字段名称** | **类型** | **是否可以为 NULL** | **描述** |
| --- | --- | --- | --- |
| SID | bigint(20) | NO | 对于 V4.3.x 版本：   - V4.3.5 BP2 之前版本：     在所有连接方式（直连模式/ODP 模式）下，该字段均表示 Server Session ID。 - V4.3.5 BP2 及之后版本：      - 在直连模式下：         该字段表示 Server Session ID。     - 在 ODP 模式下：        - 当 ODP 中的配置项 `client_session_id_version = 2` 时，该字段表示 Client Session ID。       - 当 `client_session_id_version = 1` 时，该字段表示 Server Session ID。 |
| CON_ID | bigint(20) | NO | 租户 ID |
| SVR_IP | varchar(46) | NO | 信息所在 Server 的 IP |
| SVR_PORT | bigint(20) | NO | 信息所在 Server 的端口号 |
| STATISTICS# | bigint(20) | NO | 统计事件的下标 |
| VALUE | bigint(20) | NO | 统计事件发生的次数 |

## 查询示例

查询所有 OBServer 节点的 Session 级别的统计事件信息。

```shell
obclient [oceanbase]> SELECT * FROM oceanbase.GV$SESSTAT LIMIT 1\G

```

查询结果如下：

```shell
*************************** 1. row ***************************
       SID: 3221696264
    CON_ID: 1
    SVR_IP: xx.xx.xx.xx
  SVR_PORT: 2882
STATISTIC#: 0
     VALUE: 0

```

 上一篇 下一篇 ![有帮助](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) 咨询热线
