<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="online-ddl-memory-management">
      </a>
      17.12.4 Online DDL Memory Management
     </h3>
    </div>
   </div>
  </div>
  <p>
   Online DDL operations that create or rebuild secondary indexes
      allocate temporary buffers during different phases of index
      creation. The
   <a class="link" href="innodb-parameters.html#sysvar_innodb_ddl_buffer_size">
    <code class="literal">
     innodb_ddl_buffer_size
    </code>
   </a>
   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
      (
   <a class="link" href="innodb-parameters.html#sysvar_innodb_ddl_buffer_size">
    <code class="literal">
     innodb_ddl_buffer_size
    </code>
   </a>
   /
   <a class="link" href="innodb-parameters.html#sysvar_innodb_ddl_threads">
    <code class="literal">
     innodb_ddl_threads
    </code>
   </a>
   ).
  </p>
 </div>
 <br/>
</div>
