---
title: github-fill
description: GV$OB_SYS_TIME_MODEL 说明 该视图从 V4.2.2 版本开始引入。 功能描述 视图 GV$OB_SYS_TIME_MODEL 用于展示集群中租户级别的 Time Model 统计项。 字段说明 字段名称 类型 是否可以为 NULL 描述 TENANT_ID bigint(20) NO 租户 ID …
---
切换语言

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

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

# GV$OB_SYS_TIME_MODEL

更新时间：2026-04-10 11:58:37

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

#### 说明

该视图从 V4.2.2 版本开始引入。

## 功能描述

视图 `GV$OB_SYS_TIME_MODEL` 用于展示集群中租户级别的 Time Model 统计项。

## 字段说明

| **字段名称** | **类型** | **是否可以为 NULL** | **描述** |
| --- | --- | --- | --- |
| TENANT_ID | bigint(20) | NO | 租户 ID |
| SVR_IP | varchar(46) | NO | 节点 IP |
| SVR_PORT | bigint(20) | NO | 节点端口号 |
| STAT_ID | bigint(20) | NO | 统计项 ID |
| STAT_NAME | varchar(64) | NO | 统计项名称 |
| VALUE | bigint(20) | NO | 统计项值 |

视图中 `STAT_NAME` 列的值包含的统计事件名称及对应统计事件 ID 如下表所示。

| 统计事件名称 | 描述 | 统计事件 ID | 统计事件所属类型 |
| --- | --- | --- | --- |
| DB time | 数据库活动的总时间，包括 CPU 和非空闲等待时间的累加值 | 200001 | 3072 |
| DB CPU | 数据库活动中 CPU 消耗的时间 | 200002 | 3072 |
| background elapsed time | 后台进程执行的总时间 | 200005 | 3072 |
| background cpu time | 后台进程消耗的 CPU 时间 | 200006 | 3072 |
| non idle wait time | 非空闲等待的时间，即会话处于等待状态但不是空闲等待的总时间 | 200010 | 3072 |
| idle wait time | 空闲等待的时间，即会话处于空闲等待状态的总时间 | 200011 | 3072 |
| background database time | 后台进程执行数据库操作的总时间 | 200012 | 3072 |
| background database non-idle wait time | 后台进程在非空闲等待状态下执行数据库操作的时间 | 200013 | 3072 |
| background database idle wait time | 后台进程在空闲等待状态下执行数据库操作的时间 | 200014 | 3072 |
| concurrency wait total time | 因并发问题导致的等待时间总和，例如由于资源锁定而等待的时间 | 220001 | 3072 |
| user io wait total time | 用户进程在等待 I/O 操作（如读取数据或写入数据到磁盘）完成的总时间 | 220002 | 3072 |
| application wait total time | 由用户应用程序代码产生的等待时间总和（例如，由行级锁定或显式锁定命令引起的锁等待） | 2200013 | 3072 |

## 查询示例

```shell
obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_SYS_TIME_MODEL LIMIT 10;

```

查询结果如下：

```shell
+-----------+----------------+----------+---------+-------------------------+------------+
| TENANT_ID | SVR_IP         | SVR_PORT | STAT_ID | STAT_NAME               | VALUE      |
+-----------+----------------+----------+---------+-------------------------+------------+
|         1 | 172.xx.xxx.xxx |     2882 |  200001 | DB time                 | 2911090188 |
|         1 | 172.xx.xxx.xxx |     2882 |  200002 | DB CPU                  | 2018470248 |
|         1 | 172.xx.xxx.xxx |     2882 |  200005 | background elapsed time | 3114667745 |
|         1 | 172.xx.xxx.xxx |     2882 |  200006 | background cpu time     | 2869450240 |
|         1 | 172.xx.xxx.xxx |     2882 |  200010 | non idle wait time      |  892619940 |
|         1 | 172.xx.xxx.xxx |     2882 |  200011 | idle wait time          |    6902209 |
|      1001 | 172.xx.xxx.xxx |     2882 |  200001 | DB time                 |          0 |
|      1001 | 172.xx.xxx.xxx |     2882 |  200002 | DB CPU                  |          0 |
|      1001 | 172.xx.xxx.xxx |     2882 |  200005 | background elapsed time | 2820581754 |
|      1001 | 172.xx.xxx.xxx |     2882 |  200006 | background cpu time     | 2619172661 |
+-----------+----------------+----------+---------+-------------------------+------------+
10 rows in set

```

## 相关视图或文档

- [V$OB_SYS_TIME_MODEL](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000509315)
 - [GV$OB_SESS_TIME_MODEL](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000509351)
 - [V$OB_SESS_TIME_MODEL](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000509423)
 - [oceanbase.CDB_WR_SYS_TIME_MODEL](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000509146)
 - [oceanbase.DBA_WR_SYS_TIME_MODEL](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000509268)

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