Documentation Home
MySQL 5.6 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 31.4Mb
PDF (A4) - 31.5Mb
PDF (RPM) - 30.6Mb
EPUB - 7.8Mb
HTML Download (TGZ) - 7.6Mb
HTML Download (Zip) - 7.6Mb
HTML Download (RPM) - 6.5Mb
Eclipse Doc Plugin (TGZ) - 8.3Mb
Eclipse Doc Plugin (Zip) - 10.2Mb
Man Pages (TGZ) - 185.3Kb
Man Pages (Zip) - 298.0Kb
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 MySQL 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 MySQL Cluster”.


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