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 description on rule based index selection #6815

Merged
merged 15 commits into from
Aug 12, 2021

Conversation

xuyifangreeneyes
Copy link
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
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.

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 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
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.

choose-index.md Outdated Show resolved Hide resolved
choose-index.md Outdated Show resolved Hide resolved
choose-index.md Outdated Show resolved Hide resolved
choose-index.md Outdated Show resolved Hide resolved
Comment on lines 54 to +56
- 索引的列涵盖了多少访问条件。“访问条件”指的是可以转化为某列范围的 `where` 条件,如果某个索引的列集合涵盖的访问条件越多,那么它在这个维度上更优。

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

Choose a reason for hiding this comment

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

“访问条件”的双引号需要去掉吗

Copy link
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
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
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
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.

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
Collaborator

qiancai commented Aug 12, 2021

@Rick-lee01 PTAL

xuyifangreeneyes and others added 2 commits August 12, 2021 12:09
Copy link
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
Contributor

/merge

@ti-chi-bot
Copy link
Member

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

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
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
Contributor

/merge

@ti-chi-bot
Copy link
Member

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

Commit 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
choose-index.md Outdated Show resolved Hide resolved
@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