MySQL Variables key_cache_age_threshold 数据库 参数变量解释及正确配置使用

本站中文解释

key_cache_age_threshold是MySQL的一个参数,它控制着一个MySQL键缓存的存活时间,当缓存使用率小于设定的值则MySQL会清除缓存,节省空间和提高读写性能。这个参数可以使用MySQL控制台来设置,例如:

set global key_cache_age_threshold = 3600;

即键缓存的持续时间设置为3600秒(1小时)。

官方英文解释

key_cache_age_threshold

Command-Line Format --key-cache-age-threshold=#
System Variable key_cache_age_threshold
Scope Global
Dynamic Yes
Type Integer
Default Value 300
Minimum Value 100
Maximum Value (64-bit platforms) 18446744073709551516
Maximum Value (32-bit platforms) 4294967196
Block Size 100

This value controls the demotion of buffers from the hot
sublist of a key cache to the warm sublist. Lower values cause
demotion to happen more quickly. The minimum value is 100. The
default value is 300. See Section 8.10.2, “The MyISAM Key Cache”.

The block size is 100. A value that is not an exact multiple
of the block size is rounded down to the next lower multiple
of the block size by MySQL Server before storing the value for
the system variable. The parser allows values up to the
maximum unsigned integer value for the platform (4294967295 or
232−1 for a 32-bit system,
18446744073709551615 or 264−1
for a 64-bit system) but the actual maximum is a block size
lower.


数据运维技术 » MySQL Variables key_cache_age_threshold 数据库 参数变量解释及正确配置使用