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


本站中文解释

myisam_sort_buffer_size参数用于指定MySQL使用在排序MyISAM表时预分配的内存缓冲区大小。这个参数受全局sort_buffer_size参数影响。

设置该变量的方法是,打开MySQL配置文件my.cnf,在[mysqld]节下添加: myisam_sort_buffer_size = size;

size是要设置的缓冲区大小,一般是32K或64K,上限是2G,不建议设置过大,大小与排序相关的操作消耗的内存增加与不成比例,容易引起系统负载。

官方英文解释

myisam_sort_buffer_size

Command-Line Format--myisam-sort-buffer-size=#
System Variablemyisam_sort_buffer_size
ScopeGlobal, Session
DynamicYes
TypeInteger
Default Value8388608
Minimum Value4096
Maximum Value (64-bit platforms)18446744073709551615
Maximum Value (32-bit platforms)4294967295
Unitbytes

The size of the buffer that is allocated when sorting
MyISAM indexes during a
REPAIR TABLE or when creating
indexes with CREATE INDEX or
ALTER TABLE.