-
Notifications
You must be signed in to change notification settings - Fork 1.2k
update SPM doc for SQL plan auto capture #8619
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
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
/cc @qw4990 |
sql-plan-management.md
Outdated
| SET BINDING [ENABLED | DISABLED] FOR BindableStmt; | ||
| ``` | ||
|
|
||
| 该语句可以在 GLOBAL 作用域内变更指定的执行计划绑定的状态,作用域不可指定,默认作用域为 GLOBAL。 |
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.
| 该语句可以在 GLOBAL 作用域内变更指定的执行计划绑定的状态,作用域不可指定,默认作用域为 GLOBAL。 | |
| 该语句可以在 GLOBAL 作用域内变更指定执行计划绑定的状态为 `Enabled` 或者 `Disabled`,作用域默认为 GLOBAL,不可指定。 |
sql-plan-management.md
Outdated
| | **过滤维度** | **维度名称** | **说明** | 注意事项 | | ||
| | :----------- | :----------- | :----------------------------------------------------------- | ------------------------------------------------------------ | | ||
| | 表名 | table | 按照表名进行过滤,每个过滤规则均采用 `db.table` 形式,支持通配符。详细规则可以参考[直接使用表名](/table-filter.md#直接使用表名)和[使用通配符](/table-filter.md#使用通配符)。 | 字母大小写不敏感,如果包含非法内容,日志会输出 `[sql-bind] failed to load mysql.capture_plan_baselines_blacklist` 警告。 | | ||
| | 频率 | frequency | 默认捕获执行超过一次的语句。可以设置较大值来增加捕获语句的频率。 | 插入的值小于 1 会被认为是非法值,同时,日志会输出 `[sql-bind] frequency threshold is less than 1, ignore it` 警告。如果插入了多条变更频率,频率最大的值会被用作过滤条件。 | |
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.
插入了多条指的是 INSERT INTO mysql.capture_plan_baselines_blacklist(filter_type, filter_value) VALUES('frequency', '2'), ('frequency', '3') 这样吗? 还是分别执行两次 insert 呢
Co-authored-by: Grace Cai <qqzczy@126.com>
Co-authored-by: Grace Cai <qqzczy@126.com>
Co-authored-by: Grace Cai <qqzczy@126.com>
Co-authored-by: Grace Cai <qqzczy@126.com>
|
@qiancai PTAL |
Co-authored-by: Grace Cai <qqzczy@126.com>
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.
LGTM
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 28627d7 |
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?