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

planner: add the doc for hint #13313

Merged
merged 17 commits into from Mar 20, 2023
Merged

planner: add the doc for hint #13313

merged 17 commits into from Mar 20, 2023

Conversation

Reminiscent
Copy link
Contributor

@Reminiscent Reminiscent commented Mar 7, 2023

First-time contributors' checklist

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)
  • v7.0 (TiDB 7.0 versions)
  • v6.6 (TiDB 6.6 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.4 (TiDB 6.4 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)?

  • This PR is translated from:
  • Other reference 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 Mar 7, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Oreoxmt
  • ran-huang

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 requested a review from TomShawn March 7, 2023 08:08
@ti-chi-bot ti-chi-bot added missing-translation-status This PR does not have translation status info. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 7, 2023
system-variables.md Outdated Show resolved Hide resolved
@TomShawn TomShawn self-assigned this Mar 7, 2023
@TomShawn TomShawn added translation/doing This PR’s assignee is translating this PR. v7.0 area/planner Indicates that the Issue or PR belongs to the area of SQL planner or optimizer. and removed missing-translation-status This PR does not have translation status info. labels Mar 7, 2023
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

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

LGTM

@ran-huang ran-huang assigned ran-huang and unassigned TomShawn Mar 7, 2023
@ran-huang ran-huang self-requested a review March 7, 2023 09:23

> **注意:**
>
> v6.7.0 之前的版本行为和该变量设置为 'OFF' 的行为一致。因此当从老版本升级到新版本时一些行为会发生变化,主要是 join 的连接顺序。如果有不符合预期的情况,可以通过将该参数设置为 'OFF' 的方式或者通过使用 `LEADING()` hint 的方式进行规避,强烈推荐使用后一种方式。
Copy link
Contributor

Choose a reason for hiding this comment

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

升级默认保持在OFF比较好。

@songrijie
Copy link
Contributor

rest LGTM

system-variables.md Outdated Show resolved Hide resolved
Co-authored-by: Roger Song <roger.song@pingcap.com>
Copy link
Contributor

@songrijie songrijie left a comment

Choose a reason for hiding this comment

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

LGTM

system-variables.md Outdated Show resolved Hide resolved
- 是否持久化到集群:是
- 类型:布尔型
- 默认值:`ON`
- 这个变量用来控制 join method hint 是否会影响 join reorder 的优化过程,包括 `LEADING()` hint 的使用。默认值为 `ON`,即默认不影响。如果设置为 `OFF`,在一些同时使用 join method hint 和 `LEADING()` hint 的场景下会有冲突产生。
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 这个变量用来控制 join method hint 是否会影响 join reorder 的优化过程,包括 `LEADING()` hint 的使用。默认值为 `ON`,即默认不影响。如果设置为 `OFF`,在一些同时使用 join method hint 和 `LEADING()` hint 的场景下会有冲突产生。
- 这个变量用来控制 join method hint 是否会影响 join reorder 的优化过程,包括 [`LEADING()` hint](/optimizer-hints.md#leadingt1_name--tl_name-) 的使用。默认值为 `ON`,即默认不影响。如果设置为 `OFF`,在一些同时使用 join method hint 和 `LEADING()` hint 的场景下会有冲突产生。

Copy link
Contributor

Choose a reason for hiding this comment

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

这里是否要解释下哪些 hint 属于 join method hint?

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
Contributor

Choose a reason for hiding this comment

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

至少举一个例子吧。optimizer-hint 这篇文档里也没有提过哪些属于 join method hint,可能会有一点定义不清晰

Copy link
Contributor Author

Choose a reason for hiding this comment

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

update. PTAL @ran-huang

@Oreoxmt Oreoxmt self-requested a review March 9, 2023 06:58
Reminiscent and others added 2 commits March 9, 2023 17:10
Co-authored-by: Ran <huangran.alex@gmail.com>
Co-authored-by: Ran <huangran.alex@gmail.com>
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 10, 2023
Copy link
Collaborator

@Oreoxmt Oreoxmt left a comment

Choose a reason for hiding this comment

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

Rest LGTM

system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
optimizer-hints.md Outdated Show resolved Hide resolved
optimizer-hints.md Outdated Show resolved Hide resolved
Reminiscent and others added 4 commits March 13, 2023 11:27
Co-authored-by: Aolin <aolinz@outlook.com>
Co-authored-by: Aolin <aolinz@outlook.com>
Co-authored-by: Aolin <aolinz@outlook.com>
Co-authored-by: Aolin <aolinz@outlook.com>
@Reminiscent
Copy link
Contributor Author

Update. PTAL @Oreoxmt

@Oreoxmt Oreoxmt self-requested a review March 13, 2023 03:28
Copy link
Collaborator

@Oreoxmt Oreoxmt left a comment

Choose a reason for hiding this comment

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

Rest LGTM

optimizer-hints.md Outdated Show resolved Hide resolved
optimizer-hints.md Outdated Show resolved Hide resolved
optimizer-hints.md Outdated Show resolved Hide resolved
optimizer-hints.md Outdated Show resolved Hide resolved
@Oreoxmt Oreoxmt self-requested a review March 13, 2023 04:06
@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 Mar 13, 2023
Co-authored-by: Aolin <aolinz@outlook.com>
@ran-huang ran-huang 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 Mar 13, 2023
@ran-huang ran-huang added the type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes. label Mar 17, 2023
@ran-huang
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 6c3d771

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 20, 2023
@ti-chi-bot ti-chi-bot merged commit 54d29dd into pingcap:master Mar 20, 2023
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. 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. type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes. v7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants