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


本站中文解释

`parser_max_mem_size` 变量用来设置MySQL中用于存储解析器分析SQL语句时所能使用的内存大小,用字节来衡量,默认情况下,MySQL使用4M(4194304 字节)的内存用于解析SQL语句。

要修改`parser_max_mem_size`变量值,可以使用MySQL命令行客户端,执行以下SQL语句:

SET GLOBAL parser_max_mem_size=8388608;

其中,8388608 是8M(8388608 字节)的整数值,表示MySQL解析SQL语句时可以使用的内存大小。

官方英文解释

parser_max_mem_size

Command-Line Format--parser-max-mem-size=#
Introduced5.7.12
System Variableparser_max_mem_size
ScopeGlobal, Session
DynamicYes
TypeInteger
Default Value (64-bit platforms)18446744073709551615
Default Value (32-bit platforms)4294967295
Minimum Value10000000
Maximum Value (64-bit platforms)18446744073709551615
Maximum Value (32-bit platforms)4294967295
Unitbytes

The maximum amount of memory available to the parser. The
default value places no limit on memory available. The value
can be reduced to protect against out-of-memory situations
caused by parsing long or complex SQL statements.