Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update two informtion_schema tables desc #18527

Merged
merged 15 commits into from
Oct 15, 2024
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 时间,单位是秒。
* `TIKV_CPU` 列:显示语句当前占用 `TIKV` 服务器 CPU 时间,单位是秒。
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

```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 | double | NO | | 0 | |
| TIKV_CPU | double | 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 时间,单位是秒。
* `TIKV_CPU` 列:显示语句当前占用 `TIKV` 服务器 CPU 时间,单位是秒。
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

## 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 |
yibin87 marked this conversation as resolved.
Show resolved Hide resolved
+-----------------+------------+------+-----------------+------+---------+------+------------+------------------------------------------------------+------------------------------------------------------------------+------+------+----------------------------------------+----------------+---------------+---------------+----------+----------+
```
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_usage | double | YES | | NULL | |
| Tikv_cpu_usage | double | YES | | NULL | |
yibin87 marked this conversation as resolved.
Show resolved Hide resolved
yibin87 marked this conversation as resolved.
Show resolved Hide resolved
| 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_usage | double | YES | | NULL | |
| Tikv_cpu_usage | double | YES | | NULL | |
yibin87 marked this conversation as resolved.
Show resolved Hide resolved
| Plan | longtext | YES | | NULL | |
| Plan_digest | varchar(128) | YES | | NULL | |
| Binary_plan | longtext | YES | | NULL | |
Expand Down