欢迎光临
我们一直在努力

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

本站中文解释

bulk_insert_buffer_size变量用于指定MySQL每次插入大量数据时,MySQL内部缓存内存空间的大小。当MySQL用于插入大量的内容时,设置较大的bulk_insert_buffer_size可以在保证性能的基础上提升批量插入的速度,因为MySQL可以一次性将数据放入缓冲中而不必每条记录都单独提交到磁盘上。

要设置bulk_insert_buffer_size,可以在MySQL的参数缓存中直接设置其值:

mysql> SET GLOBAL bulk_insert_buffer_size = 8388608;

官方英文解释

bulk_insert_buffer_size

Command-Line Format --bulk-insert-buffer-size=#
System Variable bulk_insert_buffer_size
Scope Global, Session
Dynamic Yes
Type Integer
Default Value 8388608
Minimum Value 0
Maximum Value (64-bit platforms) 18446744073709551615
Maximum Value (32-bit platforms) 4294967295
Unit bytes/thread

MyISAM uses a special tree-like cache to
make bulk inserts faster for
INSERT ...
SELECT
, INSERT ... VALUES (...), (...),
...
, and LOAD DATA
when adding data to nonempty tables. This variable limits the
size of the cache tree in bytes per thread. Setting it to 0
disables this optimization. The default value is 8MB.

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。