diff --git a/sql-statements/sql-statement-show-variables.md b/sql-statements/sql-statement-show-variables.md index fbf38a26abaaf..d5f232cef5bda 100644 --- a/sql-statements/sql-statement-show-variables.md +++ b/sql-statements/sql-statement-show-variables.md @@ -124,7 +124,7 @@ mysql> SHOW GLOBAL VARIABLES LIKE 'tidb%'; | tidb_snapshot | | | tidb_stmt_summary_history_size | 24 | | tidb_stmt_summary_internal_query | 0 | -| tidb_stmt_summary_max_sql_length | 4096 | +| tidb_stmt_summary_max_sql_length | 32768 | | tidb_stmt_summary_max_stmt_count | 3000 | | tidb_stmt_summary_refresh_interval | 1800 | | tidb_store_limit | 0 | @@ -173,4 +173,4 @@ The `SHOW [GLOBAL|SESSION] VARIABLES` statement in TiDB is fully compatible with ## See also -* [`SET [GLOBAL|SESSION]`](/sql-statements/sql-statement-set-variable.md) \ No newline at end of file +* [`SET [GLOBAL|SESSION]`](/sql-statements/sql-statement-set-variable.md) diff --git a/statement-summary-tables.md b/statement-summary-tables.md index 501ba65e1ce7a..9106c3430a7a5 100644 --- a/statement-summary-tables.md +++ b/statement-summary-tables.md @@ -143,7 +143,7 @@ The following system variables are used to control the statement summary: > - When a SQL digest is evicted, its related summary data of all time ranges is removed from both the `statements_summary` and `statements_summary_history` tables. As a result, even if the number of SQL digests within a specific time range does not exceed the limit, the number of SQL digests in the `statements_summary_history` table might be less than the actual number of SQL digests. If this situation occurs and affects performance, you are recommended to increase the value of `tidb_stmt_summary_max_stmt_count`. > - For TiDB Self-Managed, when [`tidb_stmt_summary_enable_persistent`](#persist-statements-summary) is enabled, data in the `statements_summary_history` table is persisted to the disk. In this case, `tidb_stmt_summary_max_stmt_count` only limits the number of SQL digests that the `statements_summary` table can store in memory, and TiDB evicts the least recently used SQL digests only from the `statements_summary` table when `tidb_stmt_summary_max_stmt_count` is exceeded. -- `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_max_sql_length`: Specifies the longest display length of `DIGEST_TEXT` and `QUERY_SAMPLE_TEXT`. The default value is `32768`. - `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`. An example of the statement summary configuration is shown as follows: diff --git a/system-variables.md b/system-variables.md index 28a74eff6cb86..ae11d196d95ba 100644 --- a/system-variables.md +++ b/system-variables.md @@ -6007,7 +6007,7 @@ For details, see [Identify Slow Queries](/identify-slow-queries.md). - Persists to cluster: Yes - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No - Type: Integer -- Default value: `4096` +- Default value: `32768` - Range: `[0, 2147483647]` - Unit: Bytes