-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
add document for explain/explain analyze of mpp query. #5754
Conversation
/cc @ilovesoup |
/label needs-cherry-pick-5.0 |
/status PTAL |
/label v5.0 |
TOC.md
Outdated
@@ -102,6 +102,14 @@ | |||
+ [SQL 性能调优概览](/sql-tuning-overview.md) | |||
+ 理解 TiDB 执行计划 | |||
+ [TiDB 执行计划概览](/explain-overview.md) | |||
+ [TiDB 执行计划 walkthrough](/explain-walkthrough.md) |
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.
These documents are added to TOC in https://github.com/pingcap/docs-cn/pull/5561/files. PTAL
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.
OK, I will delete these change in my PR, but when will that pr be merged? Looks like no one has dealt with that pr for 11 days.
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.
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.
You mean not change TOC.md
in this pr, just updating #5561 after this pr is merged?
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.
Or maybe just merge this pr, and let the owner of #5561 to resolve the conflict?
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.
"You mean not change TOC.md in this pr, just updating #5561 after this pr is merged?"
Good idea! We just need to add "TiDB mpp 执行计划" in this PR and leave other things to 5561. So this PR is not blocked by 5561.
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.
OK, I've remove TOC related changes, I think it is ready to be merged, PTAL
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.
No. You still need to add this doc to TOC in this PR. Otherwise, users cannot find this doc on the left navigation menu of the PingCAP doc site. What about MPP 模式查询的执行计划
?
explain-mpp.md
Outdated
+------------------------------------+---------+---------+-------------------+---------------+---------------------------------------------------------------------------------------------+----------------------------------------------------------------+--------+------+ | ||
``` | ||
|
||
与 explain 相比,ExchangeSender 的 operator info 中多了 task id 的输出,其记录了该 query fragment 实例化成的 MPP Task 的 task id,此外 MPP Executor 中都会有 `threads` 这一列,这列记录了 MPP 在执行该算子时使用的并发数(对于有多个节点组成的集群,改并发数是所有节点并发数相加的结果)。 |
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.
Please provide an sample of join.
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.
@windtalker, we need to complete the CN docs today. PTAL, thanks!
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.
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.
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.
LGTM except need an sample of join with shuffle.
@ilovesoup: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/lgtm |
@XuHuaiyu: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
explain-mpp.md
Outdated
+------------------------------------+---------+---------+-------------------+---------------+---------------------------------------------------------------------------------------------+----------------------------------------------------------------+--------+------+ | ||
``` | ||
|
||
与 explain 相比,ExchangeSender 的 operator info 中多了 task id 的输出,其记录了该 query fragment 实例化成的 MPP Task 的 task id,此外 MPP Executor 中都会有 `threads` 这一列,这列记录了 MPP 在执行该算子时使用的并发数(对于有多个节点组成的集群,改并发数是所有节点并发数相加的结果)。 |
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.
explain-mpp.md
Outdated
SET tidb_allow_mpp = 1; | ||
``` | ||
|
||
## MPP query fragment 和 MPP task |
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.
是否有对应的中文写法?比如 MPP 查询分片,MPP 任务?
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.
有的,我改一下
explain-mpp.md
Outdated
+------------------------------------+---------+---------+-------------------+---------------+---------------------------------------------------------------------------------------------+----------------------------------------------------------------+--------+------+ | ||
``` | ||
|
||
与 explain 相比,ExchangeSender 的 operator info 中多了 task id 的输出,其记录了该 query fragment 实例化成的 MPP Task 的 task id,此外 MPP Executor 中都会有 `threads` 这一列,这列记录了 MPP 在执行该算子时使用的并发数(对于有多个节点组成的集群,改并发数是所有节点并发数相加的结果)。 |
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.
与 explain 相比,ExchangeSender 的 operator info 中多了 task id 的输出,其记录了该 query fragment 实例化成的 MPP Task 的 task id,此外 MPP Executor 中都会有 `threads` 这一列,这列记录了 MPP 在执行该算子时使用的并发数(对于有多个节点组成的集群,改并发数是所有节点并发数相加的结果)。 | |
与 `EXPLAIN` 的输出结果相比,ExchangeSender 的 operator info 列中多了 task id 的输出,记录了该 query fragment 实例化成的 MPP Task 的 task id。此外 MPP Operator 中都会有 `threads` 这一列,这列记录了 MPP 在执行该算子时使用的并发数(对于由多个节点组成的集群,该并发数是所有节点并发数相加的结果)。 |
/remove-status PTAL |
[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 |
/remove-status require-change |
/unassign |
/label require-LGT1 |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 52bd904
|
/lgtm |
@XuHuaiyu: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 870bb10
|
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.0 in PR #5825 |
/remove-translation doing |
{{< copyable "sql" >}} | ||
|
||
```sql | ||
SET tidb_opt_broadcast_join=0; SET tidb_broadcast_join_threshold_count=0; SET tidb_broadcast_join_threshold_size=0; EXPLAIN SELECT COUNT(*) FROM t1 a JOIN t1 b ON a.id = b.id; |
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.
SET tidb_opt_broadcast_join=0;
SET tidb_broadcast_join_threshold_count=0;
SET tidb_broadcast_join_threshold_size=0;
EXPLAIN SELECT COUNT(*) FROM t1 a JOIN t1 b ON a.id = b.id;
First-time contributors' checklist
What is changed, added or deleted? (Required)
This pr add document for
explain/explain analyze
of mpp query.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?