docs icon indicating copy to clipboard operation
docs copied to clipboard

planner: add optimizer cost factors

Open terry1purcell opened this issue 8 months ago • 4 comments

First-time contributors' checklist

What is changed, added or deleted? (Required)

Documented all of the new optimizer cost factors.

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.

  • [x] master (the latest development version)
  • [ ] v9.0 (TiDB 9.0 versions)
  • [ ] v8.5 (TiDB 8.5 versions)
  • [ ] v8.4 (TiDB 8.4 versions)
  • [ ] v8.3 (TiDB 8.3 versions)
  • [ ] v8.1 (TiDB 8.1 versions)
  • [ ] v7.5 (TiDB 7.5 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)

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

terry1purcell avatar Apr 13 '25 22:04 terry1purcell

@gemini-code-assist[bot]: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

Code Review

The pull request adds documentation for new optimizer cost factors in TiDB v9.0.0. The changes seem straightforward and well-organized.

Summary of Findings

  • Typographical error: There's a typographical error in one of the variable names: tidb_opt_table_fulL_scan_cost_factor. It should be tidb_opt_table_full_scan_cost_factor.
  • Inconsistent capitalization: The capitalization of 'fulL' in tidb_opt_table_fulL_scan_cost_factor is inconsistent with other variable names. It should be full.
  • Missing period at the end of the sentence: The description for each variable lacks a period at the end of the sentence.

Merge Readiness

The pull request is almost ready for merging. However, the typographical error in the variable name tidb_opt_table_fulL_scan_cost_factor needs to be corrected. Additionally, adding a period at the end of each variable description would improve the documentation's clarity. I am unable to approve this pull request, and recommend that another reviewer approves this code before merging.

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-sigs/prow repository.

ti-chi-bot[bot] avatar Apr 13 '25 22:04 ti-chi-bot[bot]

@qw4990: 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-sigs/prow repository.

ti-chi-bot[bot] avatar Apr 14 '25 04:04 ti-chi-bot[bot]

/cc @breezewish

terry1purcell avatar Apr 25 '25 22:04 terry1purcell

@terry1purcell PTAL https://github.com/terry1purcell/docs/pull/1 and help confirm whether these system variables apply to TiDB Cloud. If they don't, we should to add the following note to each of them:

https://github.com/pingcap/docs/blob/689ea8816d65549e042478d28ed49ea0901ead9d/system-variables.md?plain=1#L4691-L4693

Oreoxmt avatar Jul 10 '25 10:07 Oreoxmt

@terry1purcell PTAL terry1purcell#1 and help confirm whether these system variables apply to TiDB Cloud. If they don't, we should to add the following note to each of them:

https://github.com/pingcap/docs/blob/689ea8816d65549e042478d28ed49ea0901ead9d/system-variables.md?plain=1#L4691-L4693

@Oreoxmt - there is nothing specific about these that would prohibit them from being utilized by TiDB cloud - unless we somehow place restrictions on what variables we expose to users. Do you know how I can validate this?

terry1purcell avatar Jul 10 '25 14:07 terry1purcell

[LGTM Timeline notifier]

Timeline:

  • 2025-07-08 09:42:28.782448131 +0000 UTC m=+1992801.505627110: :ballot_box_with_check: agreed by dveeden.
  • 2025-07-16 03:33:15.076401506 +0000 UTC m=+2661847.799580487: :ballot_box_with_check: agreed by Oreoxmt.

ti-chi-bot[bot] avatar Jul 16 '25 03:07 ti-chi-bot[bot]

/cc @lilin90

Oreoxmt avatar Jul 16 '25 03:07 Oreoxmt

/unhold

Oreoxmt avatar Aug 14 '25 05:08 Oreoxmt

/approve

Oreoxmt avatar Aug 14 '25 05:08 Oreoxmt

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Oreoxmt

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

ti-chi-bot[bot] avatar Aug 14 '25 05:08 ti-chi-bot[bot]

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

ti-chi-bot avatar Aug 14 '25 05:08 ti-chi-bot