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

sql: update explain results #2548

Merged
merged 24 commits into from
Apr 22, 2020
Merged

Conversation

LittleFall
Copy link
Contributor

What is changed, added or deleted? (Required)

Update statement of EXPLAIN with tidb-in-action.

Update explain result with current result.

Which TiDB version(s) do your changes apply to? (Required)

master

What is the related PR or file link(s)?

@CLAassistant
Copy link

CLAassistant commented Mar 24, 2020

CLA assistant check
All committers have signed the CLA.

@TomShawn TomShawn changed the title Update explain result. sql: update explain results Mar 24, 2020
@TomShawn
Copy link
Contributor

@LittleFall Please sign the CLA and involve a technical review, thanks!

@TomShawn TomShawn requested review from zz-jason and lzmhhh123 March 24, 2020 07:31
@LittleFall LittleFall added the translation/welcome Waits for a contributor to translate this PR and create a PR to the pingcap/docs-cn repository. label Mar 24, 2020
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

要在这个 PR 中把整个阅读执行计划部分都用 《TiDB in Action》 中的内容更新一下吗?对了,explain for connection 部分也需要介绍,最好也在 《TiDB in Action》中把这部分内容加上。

@TomShawn TomShawn added size/large Changes of a large size. translation/doing This PR’s assignee is translating this PR. and removed translation/welcome Waits for a contributor to translate this PR and create a PR to the pingcap/docs-cn repository. labels Mar 24, 2020
@LittleFall
Copy link
Contributor Author

要在这个 PR 中把整个阅读执行计划部分都用 《TiDB in Action》 中的内容更新一下吗?对了,explain for connection 部分也需要介绍,最好也在 《TiDB in Action》中把这部分内容加上。

整合了一下,PTAL

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

The content in reference/performance/understanding-the-query-execution-plan.md is too long. We'd better to split it into several small sections.

Maybe we can organize the content like this:

file 1: EXPLAIN Basics, covered in https://pingcap.com/docs-cn/stable/reference/sql/statements/explain/#explain
file 2: EXPLAIN FOR Connection, covered in https://pingcap.com/docs-cn/stable/reference/sql/statements/explain-analyze/
file 3: EXPLAIN ANALYZE Extension, not covered in https://pingcap.com/docs-cn/stable/reference/sql/statements/explain/, this doc need to be updated.
file 4: How to read the output of `EXPLAIN`, should be covered in this file
file 5: How to read the output of `EXPLAIN ANALYZE`, maybe we can use another file to cover this topic.

@LittleFall
Copy link
Contributor Author

The content in reference/performance/understanding-the-query-execution-plan.md is too long. We'd better to split it into several small sections.

Maybe we can organize the content like this:

file 1: EXPLAIN Basics, covered in https://pingcap.com/docs-cn/stable/reference/sql/statements/explain/#explain
file 2: EXPLAIN FOR Connection, covered in https://pingcap.com/docs-cn/stable/reference/sql/statements/explain-analyze/
file 3: EXPLAIN ANALYZE Extension, not covered in https://pingcap.com/docs-cn/stable/reference/sql/statements/explain/, this doc need to be updated.
file 4: How to read the output of `EXPLAIN`, should be covered in this file
file 5: How to read the output of `EXPLAIN ANALYZE`, maybe we can use another file to cover this topic.

有几个问题

  1. 因为 understanding-the-query-execution-plan.md 中把算子信息都介绍过了,file5 中实际没什么可写的了。
  2. 还有是不是 EXPLAIN FOR Connection 写在 explain.md 中比写在 explain-analyze.md 中要好一些?

调整了一下这些文件的结构,可能会比较清晰并且最长的文件看起来短一点。

explain.md:

  1. 语法图
  2. EXPLAIN 输出格式
  3. 示例
  4. MySQL 兼容性
  5. EXPLAIN FOR CONNECTION

explain-analyze.md:

  1. 语法图
  2. EXPLAIN ANALYZE 输出格式
  3. 示例
  4. MySQL 兼容性

understanding-the-query-execution-plan.md

  1. 使用 EXPLAIN 来优化 SQL 语句
  2. 如何阅读算子的执行顺序
  3. 算子的共有信息
  4. 算子的独特信息
  5. 优化实例

PTAL

@zz-jason
Copy link
Member

@LittleFall 可以,这种格式会合理很多。我们需要尽量确保每个独立的文档阅读时间不超过 10 分钟。

@zz-jason zz-jason requested a review from winoros March 30, 2020 07:11
@LittleFall LittleFall closed this Apr 17, 2020
@LittleFall LittleFall reopened this Apr 17, 2020
@ran-huang ran-huang added status/PTAL This PR is ready for reviewing. and removed status/require-change Needs the author to address comments. labels Apr 17, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Apr 19, 2020

@zz-jason, @winoros, @lzmhhh123, @ran-huang, PTAL.

Copy link
Contributor

@ran-huang ran-huang left a comment

Choose a reason for hiding this comment

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

Rest LGTM

reference/sql/statements/explain.md Outdated Show resolved Hide resolved
@sre-bot
Copy link
Contributor

sre-bot commented Apr 22, 2020

@zz-jason, @winoros, @lzmhhh123, @ran-huang, PTAL.

@sre-bot
Copy link
Contributor

sre-bot commented Apr 22, 2020

@LittleFall, please update your pull request.

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason
Copy link
Member

@LittleFall please resolve the code conflict, thanks.

@zz-jason zz-jason added status/require-change Needs the author to address comments. and removed status/PTAL This PR is ready for reviewing. labels Apr 22, 2020
@LittleFall LittleFall merged commit 4173557 into pingcap:master Apr 22, 2020
sre-bot pushed a commit to sre-bot/docs-cn that referenced this pull request Apr 22, 2020
* Modify explain result.

* Update with tidb-in-action.

* Reorder statements.

* Fix multi \n bug.

* Apply suggestions from code review

Co-Authored-By: Ran <huangran@pingcap.com>

* Refine some typo.

* Refine article structure.

* Remove useless "`".

* Update reference/sql/statements/explain.md

Co-Authored-By: Ran <huangran@pingcap.com>

Co-authored-by: Ran <huangran@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Apr 22, 2020

cherry pick to release-4.0 in PR #2865

sre-bot added a commit that referenced this pull request Apr 23, 2020
@toutdesuite toutdesuite added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed translation/doing This PR’s assignee is translating this PR. labels May 15, 2020
> **注意:**
>
> 目前 TiDB 的 IndexMerge 特性在 4.0 RC 版本中默认关闭,同时 4.0 中的 IndexMerge 目前支持的场景仅限于析取范式(or 连接的表达式),对合取范式(and 连接的表达式)将在之后的版本中支持。
> 开启 IndexMerge 特性,可通过在客户端中设置 session 或者 global 变量完成:`set @@tidb_enable_index_merge = 1;`
Copy link
Contributor

Choose a reason for hiding this comment

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

@LittleFall 这里“目前...中支持”要与“开启 IndexMerge 特性这一句中间空一行,不然两行实际在显示时显示为一行~

Copy link
Contributor Author

Choose a reason for hiding this comment

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

学习了,我之后一块改一下

@LittleFall LittleFall deleted the littlefall-patch-2 branch May 15, 2020 08:27
rleungx pushed a commit to rleungx/docs-cn that referenced this pull request May 22, 2020
* Modify explain result.

* Update with tidb-in-action.

* Reorder statements.

* Fix multi \n bug.

* Apply suggestions from code review

Co-Authored-By: Ran <huangran@pingcap.com>

* Refine some typo.

* Refine article structure.

* Remove useless "`".

* Update reference/sql/statements/explain.md

Co-Authored-By: Ran <huangran@pingcap.com>

Co-authored-by: Ran <huangran@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/large Changes of a large size. status/require-change Needs the author to address comments. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants