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 #18801

Merged
merged 15 commits into from
Oct 16, 2024
Merged
18 changes: 13 additions & 5 deletions information-schema/information-schema-processlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ The `PROCESSLIST` table has additional columns not present in `SHOW PROCESSLIST`
* A `RESOURCE_GROUP` column to show the resource group name.
* A `SESSION_ALIAS` column to show the alias of the current session.
* A `ROWS_AFFECTED` column to show the number of rows currently affected by the statement.
* A `TIDB_CPU` column to show the CPU time (in seconds) consumed by the TiDB server for the statement.
* A `TIKV_CPU` column to show the CPU time (in seconds) consumed by the TiKV server for the statement.

```sql
USE information_schema;
Expand All @@ -41,6 +43,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 @@ -65,6 +69,8 @@ SELECT * FROM information_schema.processlist\G
RESOURCE_GROUP: default
SESSION_ALIAS:
ROWS_AFFECTED: 0
TIDB_CPU: 0
TIKV_CPU: 0
```

Fields in the `PROCESSLIST` table are described as follows:
Expand All @@ -84,6 +90,8 @@ Fields in the `PROCESSLIST` table are described as follows:
* `RESOURCE_GROUP`: The resource group name.
* `SESSION_ALIAS`: The alias of the current session.
* `ROWS_AFFECTED`: The number of rows currently affected by the statement.
* `TIDB_CPU`: The CPU time (in seconds) consumed by the TiDB server for the statement.
* `TIKV_CPU`: The CPU time (in seconds) consumed by the TiKV server for the statement.

## CLUSTER_PROCESSLIST

Expand All @@ -94,9 +102,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 @@ -112,6 +112,8 @@ The output is as follows:
| 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 Expand Up @@ -222,6 +224,8 @@ The output is as follows:
| 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
Loading