PolarDB for MySQL supports DDL operations across six categories: indexes, primary keys, columns, tables, foreign keys, generated columns, and partitions. Before running any schema change in production, understand how each operation behaves—whether it locks the table, triggers a full rebuild, or completes in seconds by touching only metadata.
What can go wrong with a DDL operation
A single ALTER TABLE statement can do any of the following:
Hold an exclusive table lock for its entire duration, blocking all reads and writes
Trigger a full table rebuild that takes hours on large tables
Cause connection queuing: later queries pile up behind the DDL, timing out or disrupting your application
Spike IOPS and CPU usage, affecting other workloads on the same cluster
PolarDB for MySQL has made significant improvements to DDL performance and lock behavior across versions. This guide helps you identify the risk profile of each operation before you run it.
DDL execution algorithms
PolarDB automatically selects the most efficient algorithm in order: INSTANT → INPLACE → COPY. Understanding each algorithm helps you predict the impact of a DDL operation.
| Algorithm | How it works | Impact |
|---|---|---|
| INSTANT | Modifies only metadata in the data dictionary. No data is copied or rebuilt. | Completes in seconds, independent of table size. Concurrent reads and writes are allowed. |
| INPLACE | Rebuilds or reorganizes data within the storage engine. Most INPLACE operations allow concurrent reads and writes. Some INPLACE operations (for example, RENAME TABLE and ADD COMMENT) only touch metadata and complete in seconds. | Minimal impact. Concurrent DML is usually permitted. |
| COPY | Copies all data from the original table to a new table. Holds a shared-no-write (SNW) lock throughout. | Blocks all writes for the entire duration. Read operations are still permitted. |
DDL operations that allow concurrent reads and writes during execution are called Online DDL. Online DDL minimizes production impact.
Control algorithm selection with ALTER TABLE clauses
To override automatic algorithm selection or enforce a specific lock behavior, use the ALGORITHM and LOCK clauses in ALTER TABLE:
ALGORITHM clause — forces a specific algorithm. If the DDL operation does not support the specified algorithm, an error is returned immediately. Valid values: DEFAULT, INSTANT, INPLACE, COPY.
LOCK clause — controls concurrent access during DDL execution. Valid values:
| Value | Behavior |
|---|---|
DEFAULT | Grants the maximum concurrent access the DDL type supports. |
NONE | Requires concurrent reads and writes. Returns an error if not supported. |
SHARED | Allows concurrent reads, blocks writes. Returns an error if concurrent reads are not supported. |
EXCLUSIVE | Blocks all concurrent reads and writes. |
Specifying LOCK prevents the table from becoming inaccessible during execution: if the actual lock behavior does not meet the specified requirement, the operation stops immediately.
PolarDB supports parallel DDL for large-table operations such as creating indexes and rebuilding tables. Parallel DDL uses multiple threads and can improve execution speed by up to 15–20 times compared to single-threaded execution. For more information, see Parallel DDL.
Contact us
If you have any questions about DDL operations, please contact technical support.
Preview DDL behavior before execution
Because DDL behavior can be affected by table structure, parameter configurations, and enabled features, the actual behavior may differ from the tables in this guide. Use EXPLAIN DDL to preview exactly how a DDL statement will execute before running it.
{ EXPLAIN | DESCRIBE | DESC } ALTER TABLE ...EXPLAIN DDL returns:
Whether the DDL can execute successfully
The algorithm it will use (INSTANT, INPLACE, or COPY)
Whether it will rebuild the entire table
Whether concurrent DML is allowed during execution
Whether it will be blocked by uncommitted transactions
Whether parallel DDL acceleration is supported, and the degree of parallelism if so
For more information, see EXPLAIN DDL.
DDL behavior by operation
The tables below show DDL behavior across PolarDB for MySQL versions. Four columns describe the behavior of each operation:
Concurrent DML — whether concurrent reads and writes are permitted during execution
Rebuilds table — whether the operation triggers a full table rebuild (long-running for large tables)
Metadata only — whether the operation modifies only metadata (completes in seconds)
Parallel DDL — whether the operation supports parallel DDL acceleration
Index operations
| Operation | Concurrent DML | Rebuilds table | Metadata only | Parallel DDL |
|---|---|---|---|---|
| Create a secondary index | Yes | No | No | 8.0.2 / 8.0.1 / 5.7: Supported; 5.6: Not supported |
| Delete a secondary index | Yes | No | Yes | Not applicable |
| Rename a secondary index | Yes | No | Yes | Not applicable |
| Add a full-text index (FULLTEXT) | No | No¹ | No | Not supported |
| Add a spatial index (SPATIAL) | No | No | No | Not supported |
¹ When adding the first full-text index to a table, an additional table rebuild is triggered if there is no user-defined FTS_DOC_ID column.
Primary key operations
| Operation | Concurrent DML | Rebuilds table | Metadata only | Parallel DDL |
|---|---|---|---|---|
| Add a primary key | Yes¹ | Yes | No | 8.0.2 / 8.0.1 / 5.7: Supported; 5.6: Not supported |
| Delete a primary key | No | Yes | No | Not supported |
| Delete the original primary key and add a new one | Yes¹ | Yes | No | 8.0.2 / 8.0.1 / 5.7: Supported; 5.6: Not supported |
¹ Concurrent DML is allowed only when the sql_mode cluster parameter includes STRICT_TRANS_TABLES or STRICT_ALL_TABLES.
Column operations
The tables below list version-specific behavior. See the Limitations and exceptions section after the tables for important constraints on instant add column, VARCHAR length extension, and character set conversion.
PolarDB for MySQL 8.0.2
| Operation | Concurrent DML | Rebuilds table | Metadata only | Parallel DDL |
|---|---|---|---|---|
| Add a column | Yes | No¹ | Yes¹ | Supported¹ |
| Delete a column | Yes | Yes | No | Supported |
| Rename a column | Yes | No | Yes | Not applicable |
| Reorder columns | Yes | Yes | No | Supported |
| Set a column's default value | Yes | No | Yes | Not applicable |
| Modify a column comment | Yes | No | Yes | Not applicable |
| Modify a column type | No | Yes | No | Not supported |
| Extend VARCHAR length | Yes² | No | Yes | Not applicable |
| Change character set from UTF8mb3 to UTF8mb4 | No | No³ | Yes³ | Not supported |
| Delete a column's default value | Yes | No | Yes | Not applicable |
| Modify the auto-increment value | Yes | No | Yes | Not applicable |
| Change a column to NULL | Yes | Yes | No | Supported |
| Change a column to NOT NULL | No | Yes | No | Not supported |
| Modify the definition of an ENUM/SET column | Yes | No | Yes⁴ | Not applicable |
PolarDB for MySQL 8.0.1
| Operation | Concurrent DML | Rebuilds table | Metadata only | Parallel DDL |
|---|---|---|---|---|
| Add a column | Yes | No¹ | Yes¹ | Supported¹ |
| Delete a column | Yes | Yes | No | Supported |
| Rename a column | Yes | No | Yes | Not applicable |
| Reorder columns | Yes | Yes | No | Supported |
| Set a column's default value | Yes | No | Yes | Not applicable |
| Modify a column comment | Yes | No | Yes | Not applicable |
| Modify a column type | No | Yes | No | Not supported |
| Extend VARCHAR length | Yes² | No | Yes | Not applicable |
| Change character set from UTF8mb3 to UTF8mb4 | No | No³ | Yes³ | Not supported |
| Delete a column's default value | Yes | No | Yes | Not applicable |
| Modify the auto-increment value | Yes | No | Yes | Not applicable |
| Change a column to NULL | Yes | Yes | No | Supported |
| Change a column to NOT NULL | No | Yes | No | Not supported |
| Modify the definition of an ENUM/SET column | Yes | No | Yes⁴ | Not applicable |
PolarDB for MySQL 5.7
| Operation | Concurrent DML | Rebuilds table | Metadata only | Parallel DDL |
|---|---|---|---|---|
| Add a column | Yes | No¹ | Yes¹ | Supported¹ |
| Delete a column | Yes | Yes | No | Supported |
| Rename a column | Yes | No | Yes | Not applicable |
| Reorder columns | Yes | Yes | No | Supported |
| Set a column's default value | Yes | No | Yes | Not applicable |
| Modify a column comment | Yes | No | Yes | Not applicable |
| Modify a column type | No | Yes | No | Not supported |
| Extend VARCHAR length | Yes² | No | Yes | Not applicable |
| Change character set from UTF8mb3 to UTF8mb4 | No | Yes | No | Not supported |
| Delete a column's default value | Yes | No | Yes | Not applicable |
| Modify the auto-increment value | Yes | No | Yes | Not applicable |
| Change a column to NULL | Yes | Yes | No | Supported |
| Change a column to NOT NULL | No | Yes | No | Not supported |
| Modify the definition of an ENUM/SET column | Yes | No | Yes³ | Not applicable |
PolarDB for MySQL 5.6
| Operation | Concurrent DML | Rebuilds table | Metadata only | Parallel DDL |
|---|---|---|---|---|
| Add a column | Yes | No¹ | Yes¹ | Not supported |
| Delete a column | Yes | Yes | No | Not supported |
| Rename a column | Yes | No | Yes | Not applicable |
| Reorder columns | Yes | Yes | No | Not supported |
| Set a column's default value | Yes | No | Yes | Not applicable |
| Modify a column comment | Yes | No | Yes | Not applicable |
| Modify a column type | No | Yes | No | Not supported |
| Extend VARCHAR length | No | Yes | No | Not supported |
| Change character set from UTF8mb3 to UTF8mb4 | No | Yes | No | Not supported |
| Delete a column's default value | Yes | No | Yes | Not applicable |
| Modify the auto-increment value | Yes | No | Yes | Not applicable |
| Change a column to NULL | Yes | Yes | No | Not supported |
| Change a column to NOT NULL | No | Yes | No | Not supported |
| Modify the definition of an ENUM/SET column | Yes | No | Yes² | Not applicable |
Limitations and exceptions
Instant add column
When the instant add column feature is available, adding a column modifies only metadata and completes in seconds, regardless of table size. The behavior varies by version:
| Version | How to enable | Additional notes |
|---|---|---|
| 8.0.2 | Enabled by default | — |
| 8.0.1 | Enabled by default | If the table has a columnstore index, set loose_imci_enable_add_column_instant_ddl to ON. PolarDB then rebuilds the columnstore index asynchronously in the background. During the rebuild, the columnstore index is temporarily unavailable. |
| 5.7 | Set loose_innodb_support_instant_add_column to ON | — |
| 5.6 | Set loose_innodb_support_instant_add_column to ON | Currently in canary release. To enable, go to Quota Center, search for quota ID polardb_mysql_iac_56, and click Apply. Not supported on partitioned tables. |
All versions share the following constraints:
Columns can only be added to the end of the table.
If the table has no primary key, set
implicit_primary_keyto OFF to prevent the operation from failing due to an implicit primary key at the end of the table.Not supported on compressed tables (
ROW_FORMAT=COMPRESSED), tables with full-text indexes, or temporary tables.
When instant add column is not supported, the system falls back to the INPLACE algorithm, triggering a table rebuild. Concurrent reads and writes are still permitted during the rebuild, and parallel DDL can be used to accelerate it.
For more information, see instant add column.
Extending VARCHAR length
PolarDB stores a VARCHAR column's length using 1 byte for columns up to 255 bytes, and 2 bytes for columns of 256 bytes or more. Extending a VARCHAR column modifies only metadata when the extension stays within the same length range (0–255 bytes, or 256 bytes to a larger size). If the extension crosses the boundary—from less than 256 bytes to 256 bytes or more—PolarDB uses the COPY algorithm by default, locking the table for the entire duration. Write operations are blocked; reads are still permitted.
To verify that a VARCHAR modification qualifies for a metadata-only change, specify ALGORITHM=INPLACE. If the INPLACE algorithm is not supported, an error is returned immediately instead of falling back to COPY:
ALTER TABLE table_name ALGORITHM=INPLACE, CHANGE COLUMN c1 c1 VARCHAR(256);
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY.To avoid this situation in the future, set the maximum length of VARCHAR columns to 256 bytes or more when designing your schema.
Changing character set from UTF8mb3 to UTF8mb4
On 8.0.2, changing a column's character set from UTF8mb3 to UTF8mb4 modifies only metadata when all of the following conditions are met:
The column type is CHAR, VARCHAR, ENUM, or TEXT.
No index exists on the modified column.
The maximum storage length of the column is in the same range before and after the conversion (both less than 256 bytes, or both 256 bytes or more).
On 8.0.1, the same conditions apply, and additionally the parameter loose_innodb_support_instant_modify_charset must be set to ON.
On 5.7 and 5.6, the COPY algorithm is always used, rebuilding the table for the entire duration.
If the conditions are not met on 8.0.2 or 8.0.1, the COPY algorithm is used. To confirm whether a change qualifies for a metadata-only operation, specify ALGORITHM=INPLACE. If not supported, an error is returned immediately:
ALTER TABLE test MODIFY COLUMN b char(1) CHARACTER SET utf8mb4 DEFAULT NULL, ALGORITHM=INPLACE;
ERROR 1846 (0A000): ALGORITHM=INPLACE is not supported. Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY.ENUM/SET column definition changes
Modifying an ENUM or SET column modifies only metadata when the storage size of the data type does not change and you append elements to the end of the ENUM or SET. Any other change requires the COPY algorithm to rebuild the table.
Table operations
| Operation | Concurrent DML | Rebuilds table | Metadata only | Parallel DDL |
|---|---|---|---|---|
| Modify ROW_FORMAT | Yes | Yes | No | 8.0.2 / 8.0.1 / 5.7: Supported; 5.6: Not supported |
| Modify KEY_BLOCK_SIZE | Yes | Yes | No | 8.0.2 / 8.0.1 / 5.7: Supported; 5.6: Not supported |
| Set persistent statistics | Yes | No | Yes | Not applicable |
| Declare a character set | Yes | No | Yes | Not applicable |
| Convert a character set | No | Yes | No | Not supported |
| Optimize a table¹ | Yes | Yes | No | 8.0.2 / 8.0.1 / 5.7: Supported; 5.6: Not supported |
| Rebuild a table | Yes | Yes | No | 8.0.2 / 8.0.1 / 5.7: Supported; 5.6: Not supported |
| Rename a table | Yes | No | Yes | Not applicable |
| Modify a table comment | Yes | No | Yes | Not applicable |
¹ When defragmenting a table with ALTER TABLE table_name ENGINE=InnoDB, ALGORITHM=INPLACE, LOCK=NONE, the INPLACE algorithm is not supported for tables with full-text indexes.
Generated column operations
PolarDB for MySQL 5.6 does not support generated columns.
Versions 8.0.2, 8.0.1, and 5.7 have identical behavior:
| Operation | Concurrent DML | Rebuilds table | Metadata only | Parallel DDL |
|---|---|---|---|---|
| Add a STORED column | No¹ | Yes | No | Not supported |
| Change the order of a STORED column | No | Yes | No | Not supported |
| Delete a STORED column | Yes | Yes | No | Supported |
| Add a VIRTUAL column | Yes | No | Yes | Not applicable |
| Change the order of a VIRTUAL column | No | Yes | No | Not supported |
| Delete a VIRTUAL column | Yes | No | Yes | Not applicable |
¹ Adding a STORED column involves the SQL/Server layer, so Online DDL is not supported.
Foreign key operations
Behavior is identical across all versions (8.0.2, 8.0.1, 5.7, 5.6):
| Operation | Concurrent DML | Rebuilds table | Metadata only | Parallel DDL |
|---|---|---|---|---|
| Add a foreign key | Yes¹ | No¹ | Yes¹ | Not applicable |
| Delete a foreign key | Yes¹ | No¹ | Yes¹ | Not applicable |
¹ INPLACE DDL is supported only when foreign_key_checks is disabled and only metadata is modified. Otherwise, only the COPY algorithm is supported, locking the table for the entire duration.
Partitioned table operations
PolarDB for MySQL 8.0.2
| Operation | Concurrent DML | Rebuilds table | Metadata only | Parallel DDL |
|---|---|---|---|---|
| Add a partition (ADD) | Yes¹ | No² | Yes | Not supported |
| Delete a partition (DROP) | Yes¹ | No² | No | Not supported |
| Discard a partition tablespace (DISCARD) | No | No | No | Not supported |
| Import a partition tablespace (IMPORT) | No | No | No | Not supported |
| Truncate a partition (TRUNCATE) | Yes | No | No | Not supported |
| Merge partitions (COALESCE) | No | Yes³ | No | Not supported |
| Reorganize a partition (REORGANIZE) | Yes¹ | No⁴ | No | Not supported |
| Exchange a partition (EXCHANGE) | Yes¹ | No | Yes | Not supported |
| Analyze a partition (ANALYZE) | Yes | No | No⁵ | Not supported |
| Check a partition (CHECK) | Yes | No | No⁶ | Not supported |
| Optimize a partition (OPTIMIZE) | Yes⁷ | Yes⁷ | No | Supported⁷ |
| Rebuild a partition (REBUILD) | Yes¹ | No⁴ | No | Not supported |
| Repair a partition (REPAIR) | Yes | No⁸ | No | Not supported |
| Convert a table to a partitioned table | No | Yes | Yes⁹ | Not supported |
| Convert a partitioned table to a standard table | No | Yes | No | Not supported |
| Create a partial index | Yes | No¹⁰ | No | Supported |
¹ When loose_partition_level_mdl_enabled is set to true, partition-level metadata locks (MDL) ensure that DDL operations do not affect DML on unaffected partitions. For more information, see Online partition maintenance.
² For RANGE and LIST partitioned tables, adding or deleting partitions does not require a table rebuild. For HASH and KEY partitioned tables, adding partitions requires a table rebuild. Deleting partitions from HASH and KEY partitioned tables is not supported.
³ Only HASH and KEY partitions are supported.
⁴ Reorganizing or rebuilding a partition rebuilds only the specified partitions that require data redistribution and rebuilding. Other partitions are not affected.
⁵ Analyzing a partition modifies statistics only, not metadata or table data.
⁶ Checking a partition does not modify metadata or data.
⁷ When running OPTIMIZE PARTITION on an InnoDB table, the entire partitioned table is rebuilt. Reads and writes are permitted during the rebuild. Set innodb_parallel_build_primary_index to ON to use parallel DDL to accelerate the rebuild.
⁸ Repairing a partition rebuilds only the specified partitions that need repair.
⁹ Instant conversion supports only quickly converting a standard table into a range-partitioned table.
¹⁰ PolarDB for MySQL supports creating and deleting partition-level indexes. For more information, see Partial index.
PolarDB for MySQL 8.0.1
| Operation | Concurrent DML | Rebuilds table | Metadata only | Parallel DDL |
|---|---|---|---|---|
| Add a partition (ADD) | No | No¹ | Yes | Not supported |
| Delete a partition (DROP) | No | No² | No | Not supported |
| Discard a partition tablespace (DISCARD) | No | No | No | Not supported |
| Import a partition tablespace (IMPORT) | No | No | No | Not supported |
| Truncate a partition (TRUNCATE) | Yes | No | No | Not supported |
| Merge partitions (COALESCE) | No | Yes | No | Not supported |
| Reorganize a partition (REORGANIZE) | No | No³ | No | Not supported |
| Exchange a partition (EXCHANGE) | Yes | Yes | Yes | Not supported |
| Analyze a partition (ANALYZE) | Yes | Yes | No⁴ | Not supported |
| Check a partition (CHECK) | Yes | No | No⁵ | Not supported |
| Optimize a partition (OPTIMIZE) | Yes⁶ | Yes⁶ | No | Supported⁶ |
| Rebuild a partition (REBUILD) | No | No³ | No | Not supported |
| Repair a partition (REPAIR) | Yes | No³ | No | Not supported |
| Convert a table to a partitioned table | No | Yes | No | Not supported |
| Convert a partitioned table to a standard table | No | Yes | No | Not supported |
¹ For RANGE and LIST partitioned tables, adding partitions does not require a table rebuild. For HASH and KEY partitioned tables, adding partitions requires a table rebuild.
² Deleting partitions from HASH and KEY partitioned tables is not supported.
³ Reorganizing, rebuilding, and repairing a partition rebuilds only the specified partitions. Other partitions are not affected.
⁴ Analyzing a partition modifies statistics only, not metadata or table data.
⁵ Checking a partition does not modify metadata or data.
⁶ When running OPTIMIZE PARTITION on an InnoDB table, the entire partitioned table is rebuilt. Reads and writes are permitted during the rebuild. Set innodb_parallel_build_primary_index to ON to use parallel DDL to accelerate the rebuild.
PolarDB for MySQL 5.7
| Operation | Concurrent DML | Rebuilds table | Metadata only | Parallel DDL |
|---|---|---|---|---|
| Add a partition (ADD) | No | No¹ | Yes | Not supported |
| Delete a partition (DROP) | No | No¹ | No | Not supported |
| Discard a partition tablespace (DISCARD) | No | No | No | Not supported |
| Import a partition tablespace (IMPORT) | No | No | No | Not supported |
| Truncate a partition (TRUNCATE) | Yes | No | No | Not supported |
| Merge partitions (COALESCE) | No | Yes | No | Not supported |
| Reorganize a partition (REORGANIZE) | No | No² | No | Not supported |
| Swap partition | Yes | No | Yes | Not supported |
| Analyze a partition (ANALYZE) | Yes | No | No³ | Not supported |
| Check a partition (CHECK) | Yes | No | No⁴ | Not supported |
| Optimize a partition (OPTIMIZE) | No | Yes | No | Not supported |
| Rebuild a partition (REBUILD) | No | No² | No | Not supported |
| Repair a partition (REPAIR) | Yes | No² | No | Not supported |
| Convert a table to a partitioned table | No | Yes | No | Not supported |
| Convert a partitioned table to a standard table | No | Yes | No | Not supported |
¹ For RANGE and LIST partitioned tables, adding or deleting partitions does not require a table rebuild. For HASH and KEY partitioned tables, adding partitions requires a table rebuild. Deleting partitions from HASH and KEY partitioned tables is not supported.
² Reorganizing, rebuilding, and repairing a partition rebuilds only the specified partitions. Other partitions are not affected.
³ Analyzing a partition modifies statistics only, not metadata or table data.
⁴ Checking a partition does not modify metadata or data.
PolarDB for MySQL 5.6
| Operation | Concurrent DML | Rebuilds table | Metadata only | Parallel DDL |
|---|---|---|---|---|
| Add a partition (ADD) | No | No¹ | Yes | Not supported |
| Delete a partition (DROP) | No | No¹ | No | Not supported |
| Discard a partition tablespace (DISCARD) | No | No | No | Not supported |
| Import a partition tablespace (IMPORT) | No | No | No | Not supported |
| Truncate a partition (TRUNCATE) | Yes | No | No | Not supported |
| Merge partitions (COALESCE) | No | Yes | No | Not supported |
| Reorganize a partition (REORGANIZE) | No | No² | No | Not supported |
| Exchange a partition (EXCHANGE) | Yes | No | Yes | Not supported |
| Analyze a partition (ANALYZE) | Yes | No | No³ | Not supported |
| Check a partition (CHECK) | Yes | No | No⁴ | Not supported |
| Optimize a partition (OPTIMIZE) | No | Yes | No | Not supported |
| Rebuild a partition (REBUILD) | No | No² | No | Not supported |
| Repair a partition (REPAIR) | Yes | No² | No | Not supported |
| Convert a table to a partitioned table | No | Yes | No | Not supported |
| Convert a partitioned table to a standard table | No | Yes | No | Not supported |
¹ For RANGE and LIST partitioned tables, adding or deleting partitions does not require a table rebuild. For HASH and KEY partitioned tables, adding partitions requires a table rebuild. Deleting partitions from HASH and KEY partitioned tables is not supported.
² Reorganizing, rebuilding, and repairing a partition rebuilds only the specified partitions. Other partitions are not affected.
³ Analyzing a partition modifies statistics only, not metadata or table data.
⁴ Checking a partition does not modify metadata or data.
Choose an execution method
When a DDL operation uses the INSTANT or INPLACE algorithm, run it directly using the kernel (Online DDL). This is the fastest and most stable approach.
When a DDL operation uses the COPY algorithm, the table is locked for the entire duration. In this case, consider using lock-free DDL in DMS or a tool such as gh-ost to allow reads and writes during execution. These approaches are slower and may fail on large tables or high-concurrency workloads due to excessive incremental data.
| Method | Concurrent reads and writes | Speed | Binary logging required | Parallel acceleration |
|---|---|---|---|---|
| Kernel (Online DDL) | Yes | Fast | No | Supported |
| Lock-free DDL in DMS, gh-ost | Yes | Slow | Yes | Not supported |
Even with third-party tools, an MDL-X lock is acquired during table switching (when metadata is modified), temporarily blocking the table. To address this, enable the nonblocking DDL feature or the preemptive DDL feature.
Lock-free DDL operations may increase IOPS and CPU usage. Run them during off-peak hours.
Related topics
Parallel DDL — accelerate large-table DDL with multi-threaded execution
EXPLAIN DDL — preview DDL execution behavior before running it
instant add column — add columns without rebuilding the table
Implementing lock-free schema evolution — run COPY-algorithm DDL without impacting your application
Online partition maintenance — partition DDL that does not block DML on unaffected partitions
Nonblocking DDL and preemptive DDL — reduce MDL lock contention during schema changes
If you have questions about DDL operations, contact technical support.