---
title: "GV$SESSTAT - OceanBase AI 数据库 V4.6.3 | OceanBase 文档中心"
description: GV$SESSTAT 功能描述 视图 GV$SESSTAT 用于展示所有 OBServer 节点的 Session 级别的统计事件信息。 字段说明 字段名称 类型 是否可以为 NULL 描述 SID bigint(20) NO 在直连模式下： 该字段表示 Server Session ID。 在 ODP 模式下： 当…
image: https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*OSPzQ6GUQF4AAAAAQHAAAAgAeiGDAQ/original
---
[OceanBase AI 数据大会](https://www.oceanbase.com/conference2026 "OceanBase AI 数据大会")文档反馈![](https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*SXwzS7NkWdMAAAAAQCAAAAgAeiGDAQ/original) OceanBase AI 数据库V 4.6.3

# GV$SESSTAT

更新时间：2026-11-03 11:37:42

[编辑](https://github.com/oceanbase/oceanbase-database-ai/edit/V4.6.3/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)  

## 功能描述

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

## 字段说明

| **字段名称** | **类型** | **是否可以为 NULL** | **描述** |
| --- | --- | --- | --- |
| SID | bigint(20) | NO | - 在直连模式下：     该字段表示 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) 咨询
