-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add docs for Analyze Embedded in DDL and new system variable #21031
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: AilinKid <[email protected]>
Signed-off-by: AilinKid <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
There was a problem hiding this 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_ddlto control DDL embedded analyze behavior - Creates comprehensive documentation explaining DDL Embedded Analyze optimization for
ADD INDEXand 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.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Weizhen Wang <[email protected]>
Signed-off-by: AilinKid <[email protected]>
Signed-off-by: AilinKid <[email protected]>
|
@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. |
|
@hfxsd can this be merged before Fri? one of the big customer wait for this document in v8.5.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该重点介绍需要开启这个变量的使用场景;演示的话 create index 和 modify column 选一个展示效果比较好。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在开头加了一个场景背景章节
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.
Co-authored-by: Grace Cai <[email protected]>
Co-authored-by: Grace Cai <[email protected]>
Co-authored-by: Grace Cai <[email protected]>
qiancai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
Co-authored-by: Grace Cai <[email protected]>
Co-authored-by: xixirangrang <[email protected]>
Co-authored-by: Grace Cai <[email protected]>
Co-authored-by: Grace Cai <[email protected]>
|
|
||
| - 在索引可见前开始进行统计信息收集。 | ||
| - 若 Analyze 超时,[`MODIFY COLUMN`](/sql-statements/sql-statement-modify-column.md) 和 [`CHANGE COLUMN`](/sql-statements/sql-statement-change-column.md) 将不会同步等待 Analyze 完成,而是继续执行后续流程,使索引提前对用户可见。这意味着,该新索引的统计信息会在 Analyze 异步完成后更新。 | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 示例: | |
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).
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?