Skip to content

Commit

Permalink
stmtsummary: add system vars description (#12514)
Browse files Browse the repository at this point in the history
  • Loading branch information
shichun-0415 authored Feb 16, 2023
1 parent 4317505 commit b8d75ea
Showing 1 changed file with 127 additions and 0 deletions.
127 changes: 127 additions & 0 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -3798,6 +3798,133 @@ For details, see [Identify Slow Queries](/identify-slow-queries.md).
- Unit: Milliseconds
- This variable controls whether to enable the synchronously loading statistics feature. The value `0` means that the feature is disabled. To enable the feature, you can set this variable to a timeout (in milliseconds) that SQL optimization can wait for at most to synchronously load complete column statistics. For details, see [Load statistics](/statistics.md#load-statistics).
### tidb_stmt_summary_enable_persistent <span class="version-mark">New in v6.6.0</span>
<CustomContent platform="tidb-cloud">
> **Note:**
>
> This TiDB variable is not applicable to TiDB Cloud.
</CustomContent>
> **Warning:**
>
> Statements summary persistence is an experimental feature. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub.
- Scope: GLOBAL
- Type: Boolean
- Default value: `OFF`
- This variable is read-only. It controls whether to enable [statements summary persistence](/statement-summary-tables.md#persist-statements-summary).
<CustomContent platform="tidb">
- The value of this variable is the same as that of the configuration item [`tidb_stmt_summary_enable_persistent`](/tidb-configuration-file.md#tidb_stmt_summary_enable_persistent-new-in-v660).
</CustomContent>
### tidb_stmt_summary_filename <span class="version-mark">New in v6.6.0</span>
<CustomContent platform="tidb-cloud">
> **Note:**
>
> This TiDB variable is not applicable to TiDB Cloud.
</CustomContent>
> **Warning:**
>
> Statements summary persistence is an experimental feature. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub.
- Scope: GLOBAL
- Type: String
- Default value: `"tidb-statements.log"`
- This variable is read-only. It specifies the file to which persistent data is written when [statements summary persistence](/statement-summary-tables.md#persist-statements-summary) is enabled.
<CustomContent platform="tidb">
- The value of this variable is the same as that of the configuration item [`tidb_stmt_summary_filename`](/tidb-configuration-file.md#tidb_stmt_summary_filename-new-in-v660).
</CustomContent>
### tidb_stmt_summary_file_max_backups <span class="version-mark">New in v6.6.0</span>
<CustomContent platform="tidb-cloud">
> **Note:**
>
> This TiDB variable is not applicable to TiDB Cloud.
</CustomContent>
> **Warning:**
>
> Statements summary persistence is an experimental feature. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub.
- Scope: GLOBAL
- Type: Integer
- Default value: `0`
- This variable is read-only. It specifies the maximum number of data files that can be persisted when [statements summary persistence](/statement-summary-tables.md#persist-statements-summary) is enabled.
<CustomContent platform="tidb">
- The value of this variable is the same as that of the configuration item [`tidb_stmt_summary_file_max_backups`](/tidb-configuration-file.md#tidb_stmt_summary_file_max_backups-new-in-v660).
</CustomContent>
### tidb_stmt_summary_file_max_days <span class="version-mark">New in v6.6.0</span>
<CustomContent platform="tidb-cloud">
> **Note:**
>
> This TiDB variable is not applicable to TiDB Cloud.
</CustomContent>
> **Warning:**
>
> Statements summary persistence is an experimental feature. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub.
- Scope: GLOBAL
- Type: Integer
- Default value: `3`
- Unit: day
- This variable is read-only. It specifies the maximum number of days to keep persistent data files when [statements summary persistence](/statement-summary-tables.md#persist-statements-summary) is enabled.
<CustomContent platform="tidb">
- The value of this variable is the same as that of the configuration item [`tidb_stmt_summary_file_max_days`](/tidb-configuration-file.md#tidb_stmt_summary_file_max_days-new-in-v660).
</CustomContent>
### tidb_stmt_summary_file_max_size <span class="version-mark">New in v6.6.0</span>
<CustomContent platform="tidb-cloud">
> **Note:**
>
> This TiDB variable is not applicable to TiDB Cloud.
</CustomContent>
> **Warning:**
>
> Statements summary persistence is an experimental feature. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub.
- Scope: GLOBAL
- Type: Integer
- Default value: `64`
- Unit: MiB
- This variable is read-only. It specifies the maximum size of a persistent data file when [statements summary persistence](/statement-summary-tables.md#persist-statements-summary) is enabled.
<CustomContent platform="tidb">
- The value of this variable is the same as that of the configuration item [`tidb_stmt_summary_file_max_size`](/tidb-configuration-file.md#tidb_stmt_summary_file_max_size-new-in-v660).
</CustomContent>
### tidb_stmt_summary_history_size <span class="version-mark">New in v4.0</span>
- Scope: GLOBAL
Expand Down

0 comments on commit b8d75ea

Please sign in to comment.