文档首页
MySQL 8.4 参考手册
8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

17.12.4 在线 DDL 内存管理17.12.4 Online DDL Memory Management

在线 DDL 操作在创建或重建二级索引的不同阶段会分配临时缓冲区。innodb_ddl_buffer_size 变量定义了在线 DDL 操作的最大缓冲区大小。默认设置为 1048576 字节(1 MB)。该设置适用于执行在线 DDL 操作的线程创建的缓冲区。定义适当的缓冲区大小限制可以避免在创建或重建二级索引的在线 DDL 操作中可能出现的内存不足错误。每个 DDL 线程的最大缓冲区大小为最大缓冲区大小除以 DDL 线程数(innodb_ddl_buffer_size/innodb_ddl_threads)。Online DDL operations that create or rebuild secondary indexes allocate temporary buffers during different phases of index creation. The innodb_ddl_buffer_size variable defines the maximum buffer size for online DDL operations. The default setting is 1048576 bytes (1 MB). The setting applies to buffers created by threads executing online DDL operations. Defining an appropriate buffer size limit avoids potential out of memory errors for online DDL operations that create or rebuild secondary indexes. The maximum buffer size per DDL thread is the maximum buffer size divided by the number of DDL threads (innodb_ddl_buffer_size/innodb_ddl_threads).