Skip to content

Conversation

@AilinKid
Copy link
Contributor

@AilinKid AilinKid commented Oct 28, 2025

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)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 28, 2025
@hfxsd hfxsd added translation/doing This PR’s assignee is translating this PR. and removed missing-translation-status This PR does not have translation status info. labels Oct 29, 2025
@hfxsd hfxsd self-assigned this Oct 29, 2025
@hfxsd hfxsd added the type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes. label Oct 29, 2025
@qiancai qiancai added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Oct 29, 2025
.
Signed-off-by: AilinKid <[email protected]>
@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 29, 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 hfxsd. 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

@hawkingrei hawkingrei requested a review from Copilot October 29, 2025 09:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces documentation for the DDL Embedded Analyze optimization feature in TiDB v8.5.4. The feature allows DDL operations involving index creation or reorganization to automatically trigger inline statistics analysis.

Key Changes:

  • Adds a new system variable tidb_stats_update_during_ddl to control DDL embedded analyze behavior
  • Creates comprehensive documentation explaining DDL Embedded Analyze optimization for ADD INDEX and column modification operations
  • Includes practical SQL examples demonstrating the feature for both new index creation and existing index reorganization scenarios

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
system-variables.md Adds documentation for the new tidb_stats_update_during_ddl system variable introduced in v8.5.4
ddl_embedded_analyze.md New documentation file explaining DDL Embedded Analyze optimization with detailed examples for index creation and column modification operations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

AilinKid and others added 2 commits October 29, 2025 17:56
.
Signed-off-by: AilinKid <[email protected]>
@AilinKid AilinKid closed this Oct 30, 2025
@AilinKid AilinKid reopened this Oct 30, 2025
Signed-off-by: AilinKid <[email protected]>
@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 30, 2025

@hawkingrei: 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.

@AilinKid
Copy link
Contributor Author

@hfxsd can this be merged before Fri? one of the big customer wait for this document in v8.5.4

Copy link
Contributor

Choose a reason for hiding this comment

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

应该重点介绍需要开启这个变量的使用场景;演示的话 create index 和 modify column 选一个展示效果比较好。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

在开头加了一个场景背景章节

hfxsd added 2 commits November 3, 2025 10:07
Updated SQL code snippets in ddl_embedded_analyze.md to use consistent uppercase keywords and improved formatting. This enhances readability and aligns with common SQL style conventions.
@hfxsd hfxsd requested a review from qiancai November 5, 2025 02:14
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.

Rest LGTM

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 5, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Nov 5, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-10-31 06:56:35.821661885 +0000 UTC m=+1632501.898914465: ☑️ agreed by tangenta.
  • 2025-11-05 06:53:53.861156869 +0000 UTC m=+253083.304186738: ☑️ agreed by qiancai.

AilinKid and others added 2 commits November 5, 2025 17:02
@hfxsd hfxsd changed the title add ddl embedded analyze related document. Add docs for DDL-embedded Analyze and new system variable Nov 6, 2025
@hfxsd hfxsd changed the title Add docs for DDL-embedded Analyze and new system variable Add docs for Analyze Embedded in DDL and new system variable Nov 6, 2025
@hfxsd hfxsd 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 Nov 6, 2025

- 在索引可见前开始进行统计信息收集。
- 若 Analyze 超时,[`MODIFY COLUMN`](/sql-statements/sql-statement-modify-column.md)[`CHANGE COLUMN`](/sql-statements/sql-statement-change-column.md) 将不会同步等待 Analyze 完成,而是继续执行后续流程,使索引提前对用户可见。这意味着,该新索引的统计信息会在 Analyze 异步完成后更新。

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
示例:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants