Documentation Home
MySQL 5.6 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 31.6Mb
PDF (A4) - 31.6Mb
PDF (RPM) - 30.7Mb
HTML Download (TGZ) - 7.6Mb
HTML Download (Zip) - 7.7Mb
HTML Download (RPM) - 6.6Mb
Man Pages (TGZ) - 189.4Kb
Man Pages (Zip) - 303.9Kb
Info (Gzip) - 2.9Mb
Info (Zip) - 2.9Mb
Excerpts from this Manual

MySQL 5.6 Reference Manual  /  The InnoDB Storage Engine  /  InnoDB and Online DDL

14.13 InnoDB and Online DDL

The InnoDB online DDL feature permits in-place table alterations or concurrent DML, or both. Benefits of this feature include:

  • Improved responsiveness and availability in busy production environments, where making a table unavailable for minutes or hours is not practical.

  • The ability to adjust the balance between performance and concurrency during a DDL operations using the LOCK clause.

    • LOCK=EXCLUSIVE blocks access to the table entirely.

    • LOCK=SHARED allows queries but not DML.

    • LOCK=NONE allows full query and DML access to the table.

    • LOCK=DEFAULT or omitting the LOCK clause permits as much concurrency as possible depending on the type of DDL operation.

  • Avoidance of disk space usage and I/O overhead associated with copying the table and reconstructing secondary indexes.

The online DDL feature builds on the InnoDB Fast Index Creation feature that is available in MySQL 5.5, which optimized CREATE INDEX and DROP INDEX to avoid table-copying behavior.

The NDB Cluster NDB storage engine also supports online table schema changes, but uses its own syntax that is not compatible with the syntax used for InnoDB online operations. For more information, see Section 13.1.7.2, “ALTER TABLE Online Operations in NDB Cluster”.


User Comments
Sign Up Login You must be logged in to post a comment.