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

Add new order ratio being added to 8.0.0 #16972

Merged
merged 9 commits into from
Apr 8, 2024
Merged

Conversation

hfxsd
Copy link
Collaborator

@hfxsd hfxsd commented Apr 2, 2024

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)
  • v8.0 (TiDB 8.0 versions)
  • v7.6 (TiDB 7.6 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.4 (TiDB 7.4 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 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

@hfxsd hfxsd self-assigned this Apr 2, 2024
@ti-chi-bot ti-chi-bot bot added contribution Indicates that the PR was contributed by an external member. missing-translation-status This PR does not have translation status info. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 2, 2024
@hfxsd hfxsd added v8.0 This PR/issue applies to TiDB v8.0. type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes. needs-cherry-pick-release-8.0 Should cherry pick this PR to release-8.0 branch. translation/from-docs This PR is translated from a PR in pingcap/docs. and removed missing-translation-status This PR does not have translation status info. labels Apr 2, 2024
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
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.

Rest LGTM

Copy link

ti-chi-bot bot commented Apr 2, 2024

@songrijie: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

Rest LGTM

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 kubernetes/test-infra repository.

Co-authored-by: Roger Song <roger.song@pingcap.com>
@hfxsd hfxsd requested a review from Oreoxmt April 2, 2024 05:11
+-----------------------------------+----------+-----------+-----------------------+---------------------------------+
```

- The fourth example uses `1.0`, which means 100% of the possible range is estimated to be scanned.
Copy link
Member

Choose a reason for hiding this comment

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

这里漏删了?

- 其实现方式与 [tidb_opt_ordering_index_selectivity_threshold](#tidb_opt_ordering_index_selectivity_threshold-从-v700-版本开始引入) 不同,它采用的是范围内符合条件的可能行数的比率或百分比。
- 取值 `-1`(默认值)和低于零的任何其他值都会禁用此变量,从而使优化器能够估算目标行数。介于 `0` 和 `1` 之间的取值对应 0% 到 100% 的比率(例如,`0.5` 为 `50%`)。
- 在以下示例中,表 `t` 共有 1,000,000 行。使用的查询相同,但使用了不同的 `tidb_opt_ordering_index_selectivity_ratio` 值。示例中的查询具有一个 `WHERE` 子句谓词,该谓词符合少量行(1,000,000 中的 9000 行)。有一个支持 `ORDER BY a` 的索引(索引 `ia`),但是对 `b` 的过滤不在此索引中。基于数据分布,匹配 `WHERE` 子句和 `LIMIT 1` 的行可以在扫描非过滤索引时作为第 1 行访问到,或者在几乎处理了所有行之后才找到。
- 每个示例中都使用了一个索引提示,以展示对 estRows 的影响。最终计划选择取决于是否存在成本更低的其他计划。
Copy link
Member

Choose a reason for hiding this comment

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

索引提示

这里就是 hint,我感觉我们一般没翻译 hint?

system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
@Oreoxmt Oreoxmt added the for-release This PR relates to a TiDB release but does not have a tracked feature. label Apr 2, 2024
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
Co-authored-by: Zhou Kunqin <25057648+time-and-fate@users.noreply.github.com>
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
releases/release-8.0.0.md Outdated Show resolved Hide resolved
Co-authored-by: Zhou Kunqin <25057648+time-and-fate@users.noreply.github.com>
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
releases/release-8.0.0.md Outdated Show resolved Hide resolved
Copy link

ti-chi-bot bot commented Apr 3, 2024

@time-and-fate: adding LGTM is restricted to approvers and reviewers in OWNERS files.

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 kubernetes/test-infra repository.

Co-authored-by: Aolin <aolinz@outlook.com>
Copy link

ti-chi-bot bot commented Apr 8, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-08 02:33:47.090627296 +0000 UTC m=+843288.618167835: ☑️ agreed by Oreoxmt.

@hfxsd
Copy link
Collaborator Author

hfxsd commented Apr 8, 2024

/approve

@ti-chi-bot ti-chi-bot bot added the approved label Apr 8, 2024
@hfxsd
Copy link
Collaborator Author

hfxsd commented Apr 8, 2024

/retest

@hfxsd
Copy link
Collaborator Author

hfxsd commented Apr 8, 2024

/approve

@hfxsd
Copy link
Collaborator Author

hfxsd commented Apr 8, 2024

/retest

@hfxsd
Copy link
Collaborator Author

hfxsd commented Apr 8, 2024

/approve

Copy link

ti-chi-bot bot commented Apr 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hfxsd

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

releases/release-8.0.0.md Outdated Show resolved Hide resolved
@hfxsd hfxsd added the lgtm label Apr 8, 2024
@ti-chi-bot ti-chi-bot bot merged commit 25603be into pingcap:master Apr 8, 2024
6 of 7 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.0: #17029.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved contribution Indicates that the PR was contributed by an external member. for-release This PR relates to a TiDB release but does not have a tracked feature. lgtm needs-1-more-lgtm needs-cherry-pick-release-8.0 Should cherry pick this PR to release-8.0 branch. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. translation/from-docs This PR is translated from a PR in pingcap/docs. type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes. v8.0 This PR/issue applies to TiDB v8.0.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants