-
Notifications
You must be signed in to change notification settings - Fork 688
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
explain: add hint about disabling line wrapping with less #5349
Conversation
explain-overview.md
Outdated
@@ -6,6 +6,10 @@ aliases: ['/docs/dev/query-execution-plan/','/docs/dev/reference/performance/und | |||
|
|||
# `EXPLAIN` Overview | |||
|
|||
> **Note:** | |||
> | |||
> If you use the `mysql` client to connect to TiDB you may want to use `pager less -S` to avoid line wrapping in your terminal and instead press the right arrow on your keyboard to horizontally scroll through the explain output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pager less -S
and "the right arrow on your keyboard" are used together?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how this works:
mysql> pager less -S
mysql> EXPLAIN ANALYZE SELECT.....
The output is shown in less
and instead of wrapping lines it chops off the part that doesn't fit on the screen. Then by pressing the right arrow key on the keyboard you can 'scroll' to the right. Here \G
in MySQL doesn't help.
Here you can see that less
indicates there is more output on the right with >
. The output can be viewed by pressing the right arrow key on the keyboard.
This improves the output of the tree-like explain output that is in the id
column of the explain output.
/cc @morgo |
/LGTM |
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
/lgtm |
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by writing |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 1ef541e
|
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #5376 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.0 in PR #5377 |
/label requires-followup |
/translation done |
Done in #5407 |
/remove-label requires-followup |
What is changed, added or deleted? (Required)
Add a hint to the
EXPLAIN
documentation about how to useless -S
to view large explain output without line wrapping.Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?