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

Update query-execution-plan.md #3359

Merged
merged 14 commits into from
Jul 27, 2020

Conversation

ireneontheway
Copy link
Contributor

@ireneontheway ireneontheway commented Jul 21, 2020

What is changed, added or deleted? (Required)

Update the documentation for query-execution-plan.md

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

  • master (the latest development version)
  • v4.0 (TiDB 4.0 versions)
  • v3.1 (TiDB 3.1 versions)
  • v3.0 (TiDB 3.0 versions)
  • v2.1 (TiDB 2.1 versions)

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

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Have version specific changes
  • Might cause conflicts

@ireneontheway
Copy link
Contributor Author

/label size/medium,special-week,needs-cherry-pick-4.0,translation/from-docs-cn

@ti-srebot ti-srebot added needs-cherry-pick-4.0 size/medium Changes of a medium size. special-week PR from Document Special Week. translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. labels Jul 21, 2020
@ireneontheway
Copy link
Contributor Author

PTAL @yikeke

@ireneontheway
Copy link
Contributor Author

/cc yikeke

@ti-srebot ti-srebot requested a review from yikeke July 21, 2020 10:50
@ireneontheway
Copy link
Contributor Author

/cc Reminiscent

@ti-srebot ti-srebot requested review from ChenPeng2013 and removed request for ChenPeng2013 July 21, 2020 10:58
@yikeke
Copy link
Contributor

yikeke commented Jul 21, 2020

/cc zz-jason

@ti-srebot ti-srebot requested a review from zz-jason July 21, 2020 11:04
@yikeke yikeke requested review from ran-huang and removed request for yikeke July 22, 2020 02:49
query-execution-plan.md Outdated Show resolved Hide resolved
query-execution-plan.md Outdated Show resolved Hide resolved
query-execution-plan.md Outdated Show resolved Hide resolved
query-execution-plan.md Outdated Show resolved Hide resolved
query-execution-plan.md Outdated Show resolved Hide resolved

In the IndexMerge access mode, the optimizer can use multiple indexes in a table, and combine the returned results of each index to generate the execution plan of the latter IndexMerge in the figure above. Here the `IndexMerge_16` operator has three child nodes, among which `IndexRangeScan_13` and `IndexRangeScan_14` get all the `RowID`s that meet the conditions based on the result of range scan, and then the `TableRowIDScan_15` operator accurately reads all the data that meet the conditions according to these `RowID`s.

For the table scan that is performed by range such as indexRangeScan/TableRangeScan , the operator info column in the explain table has more information about the range of the scanned data than other scan operations. In the above example, the `range:(1,+inf]` in the IndexRangeScan operator indicates that the operator scans the data from 1 to positive infinity.
Copy link
Contributor

Choose a reason for hiding this comment

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

其中对于 IndexRangeScan/TableRangeScan 一类按范围进行的扫表操作来说,explain 表中 operator info 列相比于其他扫表操作,多了被扫描数据的范围这一信息
@zz-jason PTAL. 这一句原文表达不太清晰,是指把 operator info 列其他扫表操作进行比较吗?还是把 IndexRangeScan/TableRangeScan其他扫表操作进行比较呢?

Copy link
Member

Choose a reason for hiding this comment

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

是 xxxRangeScan 和 其他扫表(Scan)操作进行比较。现在扫表操作总共有这些:

  • IndexRangeScan
  • IndexFullScan
  • TableRangeScan
  • TableFullScan
  • TableRowIDScan

Copy link
Contributor

Choose a reason for hiding this comment

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

@ireneontheway 请对应修改英文,谢谢~

query-execution-plan.md Outdated Show resolved Hide resolved
query-execution-plan.md Outdated Show resolved Hide resolved
query-execution-plan.md Outdated Show resolved Hide resolved
@ran-huang
Copy link
Contributor

I just found that most of the changes can be copied from index-merge.md 🤔
@ireneontheway Could you please check this file and align some expressions? I think we'd better make use of the existing translation.

@ireneontheway
Copy link
Contributor Author

PTAL @ran-huang


In the IndexMerge access mode, the optimizer can use multiple indexes in a table, and combine the returned results of each index to generate the execution plan of the latter IndexMerge in the figure above. Here the `IndexMerge_16` operator has three child nodes, among which `IndexRangeScan_13` and `IndexRangeScan_14` get all the `RowID`s that meet the conditions based on the result of range scan, and then the `TableRowIDScan_15` operator accurately reads all the data that meet the conditions according to these `RowID`s.

For the table scan that is performed by range such as indexRangeScan/TableRangeScan , the operator info column in the explain table has more information about the range of the scanned data than other scan operations. In the above example, the `range:(1,+inf]` in the IndexRangeScan operator indicates that the operator scans the data from 1 to positive infinity.
Copy link
Member

Choose a reason for hiding this comment

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

是 xxxRangeScan 和 其他扫表(Scan)操作进行比较。现在扫表操作总共有这些:

  • IndexRangeScan
  • IndexFullScan
  • TableRangeScan
  • TableFullScan
  • TableRowIDScan

query-execution-plan.md Outdated Show resolved Hide resolved
@ran-huang
Copy link
Contributor

@ireneontheway To align with pingcap/docs-cn#3201, please also delete index-merge.md and remove the link from TOC.md

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.

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 27, 2020
---
title: Access Tables Using `IndexMerge`
summary: Learn how to access tables using the `IndexMerge` query execution plan.
aliases: ['/docs/dev/index-merge/','/docs/dev/reference/performance/index-merge/']
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add the following aliases into https://github.com/pingcap/docs/pull/3359/files#diff-7958dda55af6cba3f29e9e06ddd9d583R4:

'/docs/dev/index-merge/','/docs/dev/reference/performance/index-merge/','/tidb/dev/index-merge' @ireneontheway

Copy link
Contributor

Choose a reason for hiding this comment

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

Please note: When we delete a file, in most cases, we need to add an alias to another document to redirect the old URLs. @ireneontheway @ran-huang

Copy link
Contributor

Choose a reason for hiding this comment

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

To fix pingcap/docs-cn#3201, please help add the missing aliases to query-execution-plan.md in the docs-cn repo. @ireneontheway

@yikeke yikeke added the requires-version-specific-changes After cherry-picked, the cherry-picked PR requires further changes. label Jul 27, 2020
query-execution-plan.md Outdated Show resolved Hide resolved
query-execution-plan.md Outdated Show resolved Hide resolved
Copy link
Contributor

@yikeke yikeke left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Jul 27, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Jul 27, 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.

LGTM

@ti-srebot ti-srebot added status/LGT3 The PR has already had 3 LGTM. and removed status/LGT2 Indicates that a PR has LGTM 2. labels Jul 27, 2020
@ireneontheway ireneontheway merged commit 2e2916f into pingcap:master Jul 27, 2020
ti-srebot pushed a commit to ti-srebot/docs that referenced this pull request Jul 27, 2020
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #3427

ran-huang pushed a commit that referenced this pull request Jul 27, 2020
* cherry pick #3359 to release-4.0

Signed-off-by: ti-srebot <[email protected]>

* Update query-execution-plan.md

* Update query-execution-plan.md

* Update query-execution-plan.md

* Delete index-merge.md

Co-authored-by: ireneontheway <[email protected]>
Co-authored-by: ireneontheway <[email protected]>
ireneontheway added a commit that referenced this pull request Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires-version-specific-changes After cherry-picked, the cherry-picked PR requires further changes. size/medium Changes of a medium size. special-week PR from Document Special Week. status/LGT3 The PR has already had 3 LGTM. translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants