Skip to content

*: update the row count display of probe side of IndexJoin and Apply#11624

Merged
ti-chi-bot merged 8 commits into
pingcap:masterfrom
time-and-fate:tidb38188
Nov 15, 2022
Merged

*: update the row count display of probe side of IndexJoin and Apply#11624
ti-chi-bot merged 8 commits into
pingcap:masterfrom
time-and-fate:tidb38188

Conversation

@time-and-fate
Copy link
Copy Markdown
Member

What is changed, added or deleted? (Required)

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

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions (in Chinese).

  • master (the latest development version)
  • v6.4 (TiDB 6.4 versions)
  • v6.3 (TiDB 6.3 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)
  • v5.3 (TiDB 5.3 versions)
  • v5.2 (TiDB 5.2 versions)
  • v5.1 (TiDB 5.1 versions)
  • v5.0 (TiDB 5.0 versions)

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

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@ti-chi-bot
Copy link
Copy Markdown
Member

ti-chi-bot commented Oct 13, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • TomShawn

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Details

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot requested a review from TomShawn October 13, 2022 10:54
@ti-chi-bot ti-chi-bot added missing-translation-status This PR does not have translation status info. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 13, 2022
@qiancai qiancai added translation/doing This PR’s assignee is translating this PR. v6.4 This PR/issue applies to TiDB v6.4. labels Oct 14, 2022
@ti-chi-bot ti-chi-bot removed the missing-translation-status This PR does not have translation status info. label Oct 14, 2022
@qiancai qiancai added area/planner Indicates that the Issue or PR belongs to the area of SQL planner or optimizer. for-release This PR relates to a TiDB release but does not have a tracked feature. labels Oct 14, 2022
@TomShawn TomShawn assigned TomShawn and time-and-fate and unassigned TomShawn Oct 14, 2022
Comment thread explain-joins.md Outdated
Comment thread explain-overview.md Outdated
Comment thread explain-overview.md Outdated
> **注意:**
>
> 在 v6.4.0 之前的版本中,对于 `IndexJoin` 和 `Apply` 算子的 Probe 端所有子节点的 `estRows`,显示的行数的意义与之后的版本有所不同。
> 在之前的版本中,这些行数代表对于 Build 端子节点的每一行,Probe 端预计会处理的行数,而不是 Probe 端预计会处理的总行数。由于 `EXPLAIN ANALYZE` 中展示的实际行数(`actRows` 列)表示的是总行数,因此会有含义上的不一致。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

在 v6.4 起的版本中,estRows 的数字代表“Probe 端预计会处理的总行数” 吗?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

是的。

Copy link
Copy Markdown
Contributor

@TomShawn TomShawn Oct 18, 2022

Choose a reason for hiding this comment

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

不太理解 由于 `EXPLAIN ANALYZE` 中展示的实际行数(`actRows` 列)表示的是总行数,因此会有含义上的不一致。 这一句。

  1. 下面示例没有 EXPLAIN ANALYZE 的返回结果,对 actRows 没有解释;
  2. 是什么的总行数呢?与什么的 含义上有什么不同呢?
Suggested change
> 在之前的版本中,这些行数代表对于 Build 端子节点的每一行,Probe 端预计会处理的行数,而不是 Probe 端预计会处理的总行数。由于 `EXPLAIN ANALYZE` 中展示的实际行数(`actRows` 列)表示的是总行数,因此会有含义上的不一致
> 在 v6.4.0 之前,`estRows` 表示对于 Build 端子节点的每一行,Probe 端预计会处理的行数。自 v6.4.0 起,`estRows` 表示 Probe 端预计会处理的**总行数**。由于 `EXPLAIN ANALYZE` 中展示的实际行数(`actRows` 列)表示的是总行数,v6.4.0 起这些算子 `estRows` 的含义与 `actRows` 列的含义保持一致

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

对这两种算子的 probe 子树,行数有两种可能的表达方式,一种是单次 probe 的行数,一种是总行数。
EXPLAIN ANALYZEactRows 列显示的实际行数总是总行数,而所有估算行数总是单次 probe 的行数,因此这次把估算行数也改成总行数,让他们保持一致。

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

因为其它情况都总是表示的总行数,不太需要额外解释;只有这两个算子的这种情况,在展示估算行数的时候,以前显示的不是总行数,所以额外解释了一下。

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

这里我稍微改了下,其它地方除了下面加了个空格,都直接 apply suggestion 了。
PTAL~

Comment thread explain-overview.md Outdated
Comment thread sql-statements/sql-statement-explain.md Outdated
@time-and-fate
Copy link
Copy Markdown
Member Author

已更新,PTAL~ @TomShawn

@TomShawn
Copy link
Copy Markdown
Contributor

已更新,PTAL~ @TomShawn

comment 都更新了,请再看下吧。

@TomShawn TomShawn 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 Nov 1, 2022
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
@time-and-fate
Copy link
Copy Markdown
Member Author

已更新,请再看下吧~ @TomShawn

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 11, 2022
@TomShawn TomShawn removed the status/require-change Needs the author to address comments. label Nov 11, 2022
@TomShawn
Copy link
Copy Markdown
Contributor

/remove-status LGT1
/status LGT2

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 15, 2022
@TomShawn
Copy link
Copy Markdown
Contributor

/merge

@ti-chi-bot
Copy link
Copy Markdown
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: a7d1fb7

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 15, 2022
@ti-chi-bot ti-chi-bot merged commit c91cf43 into pingcap:master Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/planner Indicates that the Issue or PR belongs to the area of SQL planner or optimizer. for-release This PR relates to a TiDB release but does not have a tracked feature. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. v6.4 This PR/issue applies to TiDB v6.4.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants