Skip to content

Update description on rule based index selection#6815

Merged
ti-chi-bot merged 15 commits into
pingcap:masterfrom
xuyifangreeneyes:rule-based-index-selection
Aug 12, 2021
Merged

Update description on rule based index selection#6815
ti-chi-bot merged 15 commits into
pingcap:masterfrom
xuyifangreeneyes:rule-based-index-selection

Conversation

@xuyifangreeneyes
Copy link
Copy Markdown
Contributor

@xuyifangreeneyes xuyifangreeneyes commented Aug 5, 2021

What is changed, added or deleted? (Required)

Update description on rule based index selection.

Closed pingcap/tidb#27230

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

  • master (the latest development version)
  • v5.1 (TiDB 5.1 versions)
  • v5.0 (TiDB 5.0 versions)
  • 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
  • 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 Aug 5, 2021

[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 August 5, 2021 12:11
@ti-chi-bot ti-chi-bot added missing-translation-status This PR does not have translation status info. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 5, 2021
@TomShawn TomShawn added v5.2 This PR/issue applies to TiDB v5.2. translation/doing This PR’s assignee is translating this PR. labels Aug 6, 2021
@ti-chi-bot ti-chi-bot removed the missing-translation-status This PR does not have translation status info. label Aug 6, 2021
@TomShawn TomShawn requested a review from winoros August 6, 2021 02:22
@TomShawn TomShawn closed this Aug 9, 2021
@TomShawn TomShawn reopened this Aug 9, 2021
@TomShawn TomShawn added the status/PTAL This PR is ready for reviewing. label Aug 9, 2021
Copy link
Copy Markdown
Collaborator

@qiancai qiancai left a comment

Choose a reason for hiding this comment

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

Comment thread choose-index.md Outdated
Comment thread choose-index.md Outdated
Comment thread choose-index.md Outdated
Comment thread choose-index.md Outdated
xuyifangreeneyes and others added 3 commits August 10, 2021 17:51
Co-authored-by: Grace Cai <qqzczy@126.com>
Co-authored-by: Grace Cai <qqzczy@126.com>
Co-authored-by: Grace Cai <qqzczy@126.com>
Comment thread choose-index.md
Comment on lines 54 to +56
- 索引的列涵盖了多少访问条件。“访问条件”指的是可以转化为某列范围的 `where` 条件,如果某个索引的列集合涵盖的访问条件越多,那么它在这个维度上更优。

对于这三种维度,如果某个索引 `idx_a` 在**三个维度上都不比 `idx_b` 差**,且**有一个维度比 `idx_b` 好**,那么就会优先选择 `idx_a`。
- 选择该索引读表时,是否需要回表(即该索引生成的计划是 IndexReader 还是 IndexLookupReader)。不用回表的索引在这个维度上优于需要回表的索引。如果均需要回表,则比较索引的列涵盖了多少过滤条件。过滤条件指的是可以根据索引判断的 `where` 条件。如果某个索引的列集合涵盖的访问条件越多,则回表数量越少,那么它在这个维度上越优。
Copy link
Copy Markdown
Contributor 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

@winoros winoros left a comment

Choose a reason for hiding this comment

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

We add two examples for the warning message output.
rest LGTM

@TomShawn
Copy link
Copy Markdown
Contributor

We add two examples for the warning message output.
rest LGTM

So what changes should be made to this doc PR?

@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 10, 2021
@xuyifangreeneyes
Copy link
Copy Markdown
Contributor Author

We add two examples for the warning message output.
rest LGTM

So what changes should be made to this doc PR?

I have added the two examples in this PR, please take a look.

@ti-chi-bot
Copy link
Copy Markdown
Member

@winoros: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

Details

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.

@qiancai
Copy link
Copy Markdown
Collaborator

qiancai commented Aug 12, 2021

@Rick-lee01 PTAL

xuyifangreeneyes and others added 6 commits August 12, 2021 11:54
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
xuyifangreeneyes and others added 2 commits August 12, 2021 12:09
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@TomShawn TomShawn 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-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 12, 2021
@TomShawn TomShawn removed the status/require-change Needs the author to address comments. label Aug 12, 2021
@TomShawn
Copy link
Copy Markdown
Contributor

/merge

@ti-chi-bot
Copy link
Copy Markdown
Member

@TomShawn: /merge in this pull request requires 2 approval(s).

Details

In response to this:

/merge

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.

@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 Aug 12, 2021
@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: 4613bdb

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 12, 2021
Comment thread choose-index.md Outdated
@ti-chi-bot ti-chi-bot merged commit afe0e53 into pingcap:master Aug 12, 2021
@Liuxiaozhen12 Liuxiaozhen12 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 Aug 13, 2021
@xuyifangreeneyes xuyifangreeneyes mentioned this pull request Aug 26, 2021
12 tasks
@xuyifangreeneyes xuyifangreeneyes deleted the rule-based-index-selection branch October 30, 2021 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 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. v5.2 This PR/issue applies to TiDB v5.2.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation of heuristic rules enhancement for index selection

7 participants