Skip to content
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

Update the default value of tidb_stmt_summary_max_stmt_count (#6021) #6024

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sql-statements/sql-statement-show-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ mysql> SHOW GLOBAL VARIABLES LIKE 'tidb%';
| tidb_stmt_summary_history_size | 24 |
| tidb_stmt_summary_internal_query | 0 |
| tidb_stmt_summary_max_sql_length | 4096 |
| tidb_stmt_summary_max_stmt_count | 200 |
| tidb_stmt_summary_max_stmt_count | 3000 |
| tidb_stmt_summary_refresh_interval | 1800 |
| tidb_store_limit | 0 |
| tidb_txn_mode | |
Expand Down
2 changes: 1 addition & 1 deletion statement-summary-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ The following system variables are used to control the statement summary:
- `tidb_enable_stmt_summary`: Determines whether to enable the statement summary feature. `1` represents `enable`, and `0` means `disable`. The feature is enabled by default. The statistics in the system table are cleared if this feature is disabled. The statistics are re-calculated next time this feature is enabled. Tests have shown that enabling this feature has little impact on performance.
- `tidb_stmt_summary_refresh_interval`: The interval at which the `statements_summary` table is refreshed. The time unit is second (s). The default value is `1800`.
- `tidb_stmt_summary_history_size`: The size of each SQL statement category stored in the `statements_summary_history` table. The default value is `24`.
- `tidb_stmt_summary_max_stmt_count`: Limits the number of SQL statements that can be stored in statement summary tables. The default value is `200`. If the limit is exceeded, those SQL statements that recently remain unused are cleared.
- `tidb_stmt_summary_max_stmt_count`: Limits the number of SQL statements that can be stored in statement summary tables. Before v5.0.4, the default value is `200`. Since v5.0.4, the default value is `3000`. If the limit is exceeded, those SQL statements that recently remain unused are cleared.
- `tidb_stmt_summary_max_sql_length`: Specifies the longest display length of `DIGEST_TEXT` and `QUERY_SAMPLE_TEXT`. The default value is `4096`.
- `tidb_stmt_summary_internal_query`: Determines whether to count the TiDB SQL statements. `1` means to count, and `0` means not to count. The default value is `0`.

Expand Down
2 changes: 1 addition & 1 deletion system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ SET tidb_slow_log_threshold = 200;
### tidb_stmt_summary_max_stmt_count <span class="version-mark">New in v4.0</span>

- Scope: SESSION | GLOBAL
- Default value: `200`
- Default value: Before v5.0.4, the default value is `200`. Since v5.0.4, the default value is `3000`.
- Range: `[1, 32767]`
- This variable is used to set the maximum number of statements that [statement summary tables](/statement-summary-tables.md) store in memory.

Expand Down