master: add doc for tidb_enable_cache_prepare_stmt#23216
Conversation
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Synced from: pingcap/docs-cn#21574 Target PR: pingcap#23216 AI Provider: azure Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
|
Auto-sync completed successfully Source PR: pingcap/docs-cn#21574 English documentation has been updated based on Chinese documentation changes. |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request documents a new system variable, tidb_enable_cache_prepare_stmt, which controls the caching of prepared statement results. The review feedback focuses on aligning the documentation with the style guide by reducing passive voice, addressing the user in the second person, and using uppercase for SQL statements like PREPARE and EXECUTE.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| > **Warning:** | ||
| > | ||
| > Currently, this variable is an experimental feature and is not recommended to be enabled in the production environment. This variable might be changed or removed without prior notice. If you find a bug, you can submit an [issue](https://github.com/pingcap/tidb/issues) on GitHub. |
There was a problem hiding this comment.
The warning message uses passive voice ("is not recommended to be enabled") and singular "production environment". To improve clarity and adhere to the style guide, use active voice and plural "production environments".
| > Currently, this variable is an experimental feature and is not recommended to be enabled in the production environment. This variable might be changed or removed without prior notice. If you find a bug, you can submit an [issue](https://github.com/pingcap/tidb/issues) on GitHub. | |
| > Currently, this variable is an experimental feature and is not recommended for use in production environments. This variable might be changed or removed without prior notice. If you find a bug, you can submit an [issue](https://github.com/pingcap/tidb/issues) on GitHub. |
References
- Avoid passive voice overuse and ensure documentation is easy to understand. (link)
| - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes | ||
| - Type: Boolean | ||
| - Default value: `OFF` | ||
| - This variable controls whether to cache the results of `Prepare` statements. Typically, an application only needs to execute `Prepare` once and then execute `Execute` multiple times. All subsequent `Execute` operations can reuse the results generated by the first `Prepare`. If the application needs to repeatedly send the same `Prepare` statement, you can enable this variable so that TiDB can cache and reuse the processing results of identical `Prepare` statements, thereby reducing resource consumption. |
There was a problem hiding this comment.
To maintain terminology consistency and adhere to the style guide, use uppercase PREPARE and EXECUTE when referring to SQL statements. Additionally, write in the second person ("your application") and simplify the phrasing to avoid passive voice ("results generated by").
| - This variable controls whether to cache the results of `Prepare` statements. Typically, an application only needs to execute `Prepare` once and then execute `Execute` multiple times. All subsequent `Execute` operations can reuse the results generated by the first `Prepare`. If the application needs to repeatedly send the same `Prepare` statement, you can enable this variable so that TiDB can cache and reuse the processing results of identical `Prepare` statements, thereby reducing resource consumption. | |
| - This variable controls whether to cache the results of `PREPARE` statements. Typically, an application only needs to execute `PREPARE` once and then execute `EXECUTE` multiple times. All subsequent `EXECUTE` operations can reuse the results of the first `PREPARE`. If your application repeatedly sends the same `PREPARE` statement, you can enable this variable so that TiDB can cache and reuse the processing results of identical `PREPARE` statements, thereby reducing resource consumption. |
References
- Use consistent terminology, write in second person, and avoid passive voice. (link)
|
@qw4990: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn 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. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiancai The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
In response to a cherrypick label: new pull request created to branch |
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?