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

本站中文解释

myisam_repair_threads是MySQL提供的数据库参数,主要用来控制MySQL在修复MyISAM表时,使用的线程数量。这个参数默认值是1,可以设置的值范围从1到128,数值越大则分配的线程数量越多,越容易加快修复速度。

设置方法如下:

1、在MySQL命令行中进入MySQL命令提示符,然后输入以下命令完成参数设置。

SET GLOBAL myisam_repair_threads=4;

2、将设置写入my.cnf配置文件中,在[mysqld]节中加入以下配置:

myisam_repair_threads = 4

3、重新启动MySQL服务,使配置的参数生效。

官方英文解释

myisam_repair_threads

Command-Line Format --myisam-repair-threads=#
Deprecated 5.7.38 (removed in 5.7.39)
System Variable myisam_repair_threads
Scope Global, Session
Dynamic Yes
Type Integer
Default Value 1
Minimum Value 1
Maximum Value (64-bit platforms) 18446744073709551615
Maximum Value (32-bit platforms) 4294967295
Note

This system variable is deprecated in MySQL
5.7; expect it to be removed in a future
release of MySQL.

From MySQL 5.7.38, values other than 1 produce a warning.

If this value is greater than 1, MyISAM
table indexes are created in parallel (each index in its own
thread) during the Repair by sorting
process. The default value is 1.

Note

Multithreaded repair is beta-quality
code.


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