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

Announce GA of memory control on stats cache #19226

Merged
merged 10 commits into from
Dec 9, 2024
Merged
8 changes: 8 additions & 0 deletions releases/release-7.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@ TiDB 版本:7.4.0

更多信息,请参考[用户文档](/system-variables.md#tidb_opt_enable_hash_join-从-v656v712-和-v740-版本开始引入)。

* 控制统计信息缓存成为正式功能 (GA) [#45367](https://github.com/pingcap/tidb/issues/45367) @[hawkingrei](https://github.com/hawkingrei)

TiDB 实例可以缓存表的统计信息,以加速执行计划的生成,提升 SQL 执行性能。从 v6.1.0 开始,引入了系统变量 [`tidb_stats_cache_mem_quota`](/system-variables.md#tidb_stats_cache_mem_quota-从-v610-版本开始引入),你可以通过设置该变量,控制统计信息缓存占用的内存上限。当统计信息缓存达到限额时,TiDB 会自动驱逐不活跃的缓存,从而控制实例的内存使用,提升稳定性。

从 v7.4.0 开始,该功能成为正式功能 (GA)。

更多信息,请参考[用户文档](/system-variables.md#tidb_stats_cache_mem_quota-从-v610-版本开始引入)。

### SQL 功能

* TiDB 支持完整的分区类型管理功能 [#42728](https://github.com/pingcap/tidb/issues/42728) @[mjonss](https://github.com/mjonss)
Expand Down
5 changes: 3 additions & 2 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -4803,8 +4803,9 @@ Query OK, 0 rows affected, 1 warning (0.00 sec)
- 是否受 Hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value) 控制:否
- 类型:整数型
- 单位:字节
- 默认值:`0`,自动设置内部统计信息缓存使用内存的上限为总内存的一半。
- 这个变量用于控制 TiDB 内部统计信息缓存使用内存的上限。
- 默认值:`0`,表示自动设置统计信息缓存的内存使用上限为总内存的一半。
- 范围:`[0, 1099511627776]`
Copy link
Member

@lilin90 lilin90 Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI. I added the value range via a1450f7 to align the description with that in English: https://docs.pingcap.com/tidb/v7.5/system-variables#tidb_stats_cache_mem_quota-new-in-v610
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

- 这个变量用于控制 TiDB 统计信息缓存的内存使用上限。

### `tidb_stats_load_sync_wait` <span class="version-mark">从 v5.4.0 版本开始引入</span>

Expand Down
Loading