Skip to content

Commit c15b979

Browse files
authored
include storage engines in slow query logs and statements summary (#21155)
1 parent 6518b74 commit c15b979

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

identify-slow-queries.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ Fields related to Resource Control:
168168
* `Request_unit_write`: the total write RUs consumed by the statement.
169169
* `Time_queued_by_rc`: the total time that the statement waits for available resources.
170170

171+
Fields related to storage engines:
172+
173+
- `Storage_from_kv`: introduced in v9.0.0, indicates whether this statement read data from TiKV.
174+
- `Storage_from_mpp`: introduced in v9.0.0, indicates whether this statement read data from TiFlash.
175+
171176
## Related system variables
172177

173178
* [`tidb_slow_log_threshold`](/system-variables.md#tidb_slow_log_threshold): Sets the threshold for the slow log. The SQL statement whose execution time exceeds this threshold is recorded in the slow log. The default value is 300 (ms).

statement-summary-tables.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,11 @@ Fields related to network traffic:
467467
- `SUM_UNPACKED_BYTES_SENT_TIFLASH_CROSS_ZONE`: bytes sent from SQL statements to TiFlash across availability zones, including bytes sent between TiFlash nodes across availability zones.
468468
- `SUM_UNPACKED_BYTES_RECEIVED_TIFLASH_CROSS_ZONE`: bytes received by SQL statements from TiFlash across availability zones, including bytes received between TiFlash nodes across availability zones.
469469

470+
Fields related to storage engines:
471+
472+
- `STORAGE_KV`: introduced in v9.0.0, indicates whether the previous execution of SQL statements of this category read data from TiKV.
473+
- `STORAGE_MPP`: introduced in v9.0.0, indicates whether the previous execution of SQL statements of this category read data from TiFlash.
474+
470475
### `statements_summary_evicted` fields description
471476

472477
- `BEGIN_TIME`: Records the starting time.

0 commit comments

Comments
 (0)