MySQL Variables bulk_insert_buffer_size 数据库 参数变量解释及正确配置使用
  iDU31ygkXmx7 2023年11月20日 26 0

本站中文解释

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.

【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月20日 0

暂无评论

iDU31ygkXmx7
最新推荐 更多

2024-05-17