Skip to content

Commit

Permalink
Update two informtion_schema tables desc (#18527)
Browse files Browse the repository at this point in the history
  • Loading branch information
yibin87 authored Oct 15, 2024
1 parent 415761e commit 6e075c5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
18 changes: 13 additions & 5 deletions information-schema/information-schema-processlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ aliases: ['/docs-cn/dev/information-schema/information-schema-processlist/']
* `RESOURCE_GROUP` 列:显示对应的资源组名称。
* `SESSION_ALIAS` 列:显示当前连接的别名。
* `ROWS_AFFECTED` 列:显示语句当前影响的行数。
* `TIDB_CPU` 列:显示语句当前占用 TiDB 服务器 CPU 的时间,单位是纳秒。该列仅在开启 [Top SQL 特性](/dashboard/top-sql.md)时显示实际值,否则始终显示为 `0`
* `TIKV_CPU` 列:显示语句当前占用 TiKV 服务器 CPU 的时间,单位是纳秒。

```sql
USE information_schema;
Expand All @@ -42,6 +44,8 @@ DESC processlist;
| RESOURCE_GROUP | varchar(32) | NO | | | |
| SESSION_ALIAS | varchar(64) | NO | | | |
| ROWS_AFFECTED | bigint(21) unsigned | YES | | NULL | |
| TIDB_CPU | bigint(21) | NO | | 0 | |
| TIKV_CPU | bigint(21) | NO | | 0 | |
+----------------+---------------------+------+------+---------+-------+
```

Expand All @@ -66,6 +70,8 @@ SELECT * FROM information_schema.processlist\G
RESOURCE_GROUP: default
SESSION_ALIAS:
ROWS_AFFECTED: 0
TIDB_CPU: 0
TIKV_CPU: 0
```

`PROCESSLIST` 表各列的含义如下:
Expand All @@ -85,6 +91,8 @@ RESOURCE_GROUP: default
* `RESOURCE_GROUP` 列:显示对应的资源组名称。
* `SESSION_ALIAS` 列:显示当前连接的别名。
* `ROWS_AFFECTED` 列:显示语句当前影响的行数。
* `TIDB_CPU` 列:显示语句当前占用 TiDB 服务器 CPU 的时间,单位是纳秒。该列仅在开启 [Top SQL 特性](/dashboard/top-sql.md)时显示实际值,否则始终显示为 `0`
* `TIKV_CPU` 列:显示语句当前占用 TiKV 服务器 CPU 的时间,单位是纳秒。

## CLUSTER_PROCESSLIST

Expand All @@ -97,9 +105,9 @@ SELECT * FROM information_schema.cluster_processlist;
```

```sql
+-----------------+------------+------+-----------------+------+---------+------+------------+------------------------------------------------------+------------------------------------------------------------------+------+------+----------------------------------------+----------------+---------------+---------------+
| INSTANCE | ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO | DIGEST | MEM | DISK | TxnStart | RESOURCE_GROUP | SESSION_ALIAS | ROWS_AFFECTED |
+-----------------+------------+------+-----------------+------+---------+------+------------+------------------------------------------------------+------------------------------------------------------------------+------+------+----------------------------------------+----------------+---------------+---------------+
| 127.0.0.1:10080 | 1268776964 | root | 127.0.0.1:59922 | NULL | Query | 0 | autocommit | SELECT * FROM information_schema.cluster_processlist | b1e38e59fbbc3e2b35546db5c8053040db989a497ac6cd71ff8dd4394395701a | 0 | 0 | 07-29 12:39:24.282(451471727468740609) | default | | 0 |
+-----------------+------------+------+-----------------+------+---------+------+------------+------------------------------------------------------+------------------------------------------------------------------+------+------+----------------------------------------+----------------+---------------+---------------+
+-----------------+------------+------+-----------------+------+---------+------+------------+------------------------------------------------------+------------------------------------------------------------------+------+------+----------------------------------------+----------------+---------------+---------------+----------+----------+
| INSTANCE | ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO | DIGEST | MEM | DISK | TxnStart | RESOURCE_GROUP | SESSION_ALIAS | ROWS_AFFECTED | TIDB_CPU | TIKV_CPU |
+-----------------+------------+------+-----------------+------+---------+------+------------+------------------------------------------------------+------------------------------------------------------------------+------+------+----------------------------------------+----------------+---------------+---------------+----------+----------+
| 127.0.0.1:10080 | 1268776964 | root | 127.0.0.1:59922 | NULL | Query | 0 | autocommit | SELECT * FROM information_schema.cluster_processlist | b1e38e59fbbc3e2b35546db5c8053040db989a497ac6cd71ff8dd4394395701a | 0 | 0 | 07-29 12:39:24.282(451471727468740609) | default | | 0 | 0 | 0 |
+-----------------+------------+------+-----------------+------+---------+------+------------+------------------------------------------------------+------------------------------------------------------------------+------+------+----------------------------------------+----------------+---------------+---------------+----------+----------+
```
4 changes: 4 additions & 0 deletions information-schema/information-schema-slow-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ DESC slow_query;
| Request_unit_read | double | YES | | NULL | |
| Request_unit_write | double | YES | | NULL | |
| Time_queued_by_rc | double | YES | | NULL | |
| Tidb_cpu_time | double | YES | | NULL | |
| Tikv_cpu_time | double | YES | | NULL | |
| Plan | longtext | YES | | NULL | |
| Plan_digest | varchar(128) | YES | | NULL | |
| Binary_plan | longtext | YES | | NULL | |
Expand Down Expand Up @@ -190,6 +192,8 @@ DESC CLUSTER_SLOW_QUERY;
| Request_unit_read | double | YES | | NULL | |
| Request_unit_write | double | YES | | NULL | |
| Time_queued_by_rc | double | YES | | NULL | |
| Tidb_cpu_time | double | YES | | NULL | |
| Tikv_cpu_time | double | YES | | NULL | |
| Plan | longtext | YES | | NULL | |
| Plan_digest | varchar(128) | YES | | NULL | |
| Binary_plan | longtext | YES | | NULL | |
Expand Down

0 comments on commit 6e075c5

Please sign in to comment.