Skip to content

Conversation

AilinKid
Copy link
Contributor

@AilinKid AilinKid commented Jun 5, 2025

First-time contributors' checklist

What is changed, added or deleted? (Required)

This PR updates documentation for the cascades planner.

EN PR: pingcap/docs#21773

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)
  • 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

.
Signed-off-by: AilinKid <[email protected]>
@ti-chi-bot ti-chi-bot bot added missing-translation-status This PR does not have translation status info. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 5, 2025
@AilinKid AilinKid changed the title planner: add new cascades. planner: add new cascades planner document. Jun 5, 2025
@AilinKid AilinKid added the v9.0-beta.2 This PR/issue applies to TiDB v9.0-beta.2. label Jun 5, 2025
@Oreoxmt Oreoxmt self-assigned this Jun 5, 2025
@Oreoxmt Oreoxmt added the translation/doing This PR’s assignee is translating this PR. label Jun 5, 2025
@ti-chi-bot ti-chi-bot bot removed the missing-translation-status This PR does not have translation status info. label Jun 5, 2025
@Oreoxmt Oreoxmt self-requested a review June 5, 2025 10:59
@Oreoxmt Oreoxmt assigned lilin90 and unassigned Oreoxmt Jul 18, 2025
@Oreoxmt Oreoxmt requested review from lilin90 and removed request for Oreoxmt July 18, 2025 10:22
@lilin90 lilin90 requested a review from hfxsd July 21, 2025 08:23
@lilin90 lilin90 changed the title planner: add new cascades planner document. planner: add new cascades planner document Jul 22, 2025
- 类型:布尔型
- 默认值:`OFF`
- 这个变量用于控制是否开启 cascades planner。
- 目前 cascades 优化器默认为 `OFF`, 我们将在临近几个 DMR 版本之内收敛新优化器的相关问题,并且在下个 LTS 默认开启 cascades planner。
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- 目前 cascades 优化器默认为 `OFF`, 我们将在临近几个 DMR 版本之内收敛新优化器的相关问题,并且在下个 LTS 默认开启 cascades planner。
- 目前 cascades 优化器默认为 `OFF`。在未来几个 DMR 版本之内会收敛新优化器的相关问题,并且在下个 LTS 版本默认开启 cascades planner。

Copy link
Member

Choose a reason for hiding this comment

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

Generally, do not pre-announce features in official documentation. I suggest keeping the original wording.

@lilin90 lilin90 added the for-release This PR relates to a TiDB release but does not have a tracked feature. label Aug 19, 2025
Copy link

ti-chi-bot bot commented Aug 19, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from lilin90. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found 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

> **注意**
>
> 目前 cascades planner 为实验特性,不建议在生产环境中使用
> 目前 cascades planner 为全新的优化器框架实现,其在设计之初就是为了兼容性出发考虑的,其可以在最大程度上保证和原有优化器逻辑的兼容性,并且在逻辑层面能够给到一定的扩展空间,此外还能够在多重逻辑计划之间进行 CBO 决策。目前 cascades planner 开启之后由于逻辑 rule 的数量目前还比较有限,其做 plan 的能力不一定会显现出很大的提升,但是随着后续 [TiDB Cascades Rule Evolution Project](https://github.com/pingcap/tidb/issues/61528) 项目的不断深入,cascades planner 将会展现更大的灵活性和适用性
Copy link
Member

@lilin90 lilin90 Sep 10, 2025

Choose a reason for hiding this comment

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

Suggested change
> 目前 cascades planner 为全新的优化器框架实现,其在设计之初就是为了兼容性出发考虑的,其可以在最大程度上保证和原有优化器逻辑的兼容性,并且在逻辑层面能够给到一定的扩展空间,此外还能够在多重逻辑计划之间进行 CBO 决策。目前 cascades planner 开启之后由于逻辑 rule 的数量目前还比较有限,其做 plan 的能力不一定会显现出很大的提升,但是随着后续 [TiDB Cascades Rule Evolution Project](https://github.com/pingcap/tidb/issues/61528) 项目的不断深入,cascades planner 将会展现更大的灵活性和适用性
> Cascades planner 是 TiDB 引入的一种全新的优化器框架。该框架充分考虑了与现有优化器逻辑的兼容性,并在逻辑层面预留了扩展空间。借助这一框架,优化器能够在多个候选逻辑执行计划之间进行基于代价的优化 (Cost-Based Optimization, CBO) 决策
>
> 目前,当开启 cascades planner 时,由于逻辑规则 (rule) 数量有限,生成的执行计划在性能上未必有显著提升。但随着 [TiDB Cascades Rule Evolution Project](https://github.com/pingcap/tidb/issues/61528) 的推进,cascades planner 将逐步展现更大的灵活性和适用性,为复杂查询场景提供更好的优化能力。

### `tidb_enable_cascades_planner`

> **警告**
> **注意**
Copy link
Member

@lilin90 lilin90 Sep 15, 2025

Choose a reason for hiding this comment

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

Since "Cascades Planner" is listed in TiDB 功能概览 | TiDB 文档中心, please confirm whether we need to update the status in that table. Till v8.5, the feature status is experimental. Is it GA in v9.0?

@lilin90 lilin90 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 Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for-release This PR relates to a TiDB release but does not have a tracked feature. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. v9.0-beta.2 This PR/issue applies to TiDB v9.0-beta.2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants