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

sys-variables: update tidb_schema_cache_size default value #19007

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 4 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
10 changes: 6 additions & 4 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -5163,15 +5163,17 @@ SHOW WARNINGS;

> **Warning:**
>
> The feature controlled by this variable is not yet effective in the current TiDB version. Do not change the default value.
> The feature controlled by this variable is experimental. 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
- Persists to cluster: Yes
- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No
- Type: Integer
- Default value: `0`
- Range: `0` or `[536870912, 9223372036854775807]`
- This variable controls the size of the schema cache in TiDB. The unit is byte. The default value is `0`, which means the cache limit feature is disabled. To enable this feature, you need to set a value within the range `[536870912, 9223372036854775807]`. TiDB will use this value as the maximum available memory limit and apply the Least Recently Used (LRU) algorithm to cache the required tables, effectively reducing the memory used by schema information.
- Default value: `536870912` (512 MiB)
- Range: `0` or `[67108864, 9223372036854775807]`
- Before TiDB v8.4.0, the default value of this variable is `0`.
- Starting from TiDB v8.4.0, the default value is `536870912`. When you upgrade from an earlier version to v8.4.0 or later, the old values will still be used.
lilin90 marked this conversation as resolved.
Show resolved Hide resolved
- This variable controls the size of the schema cache in TiDB. The unit is byte. If the value is `0`, it means the cache limit feature is disabled. To enable this feature, you need to set a value within the range `[67108864, 9223372036854775807]`. TiDB will use this value as the maximum available memory limit and apply the Least Recently Used (LRU) algorithm to cache the required tables, effectively reducing the memory used by schema information.
lilin90 marked this conversation as resolved.
Show resolved Hide resolved

### tidb_schema_version_cache_limit <span class="version-mark">New in v7.4.0</span>

Expand Down
Loading