Skip to content

include storage engines in slow query logs and statements summary #21155

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions identify-slow-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ Fields related to Resource Control:
* `Request_unit_write`: the total write RUs consumed by the statement.
* `Time_queued_by_rc`: the total time that the statement waits for available resources.

Fields related to storage engines:

- `Storage_from_kv`: Whether this statement read data from TiKV.
- `Storage_from_mpp`: Whether this statement read data from TiFlash.
Comment on lines +171 to +174

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

This new section clearly documents the added fields related to storage engines. The formatting with a heading and list, using backticks for field names, aligns well with the style guide 12.

Style Guide References

Footnotes

  1. Use sentence case for headings and backticks for code snippets, command names, options, and paths. (link)

  2. Add a blank line before and after headings and lists. (link)


## Related system variables

* [`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).
Expand Down
5 changes: 5 additions & 0 deletions statement-summary-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,11 @@ Fields related to network traffic:
- `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.
- `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.

Fields related to storage engines:

- `STORAGE_KV`: Indicates whether the previous execution of SQL statements of this category read data from TiKV.
- `STORAGE_MPP`: Indicates whether the previous execution of SQL statements of this category read data from TiFlash.
Comment on lines +470 to +473

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

This addition effectively documents the new storage engine fields in the statement summary tables. The structure with a heading and list, using backticks for field names, is consistent with the document's existing style and the style guide 12. The descriptions accurately reflect the purpose of these fields in the context of summary tables.

Style Guide References

Footnotes

  1. Use sentence case for headings and backticks for code snippets, command names, options, and paths. (link)

  2. Add a blank line before and after headings and lists. (link)


### `statements_summary_evicted` fields description

- `BEGIN_TIME`: Records the starting time.
Expand Down