When executing an ALTER TABLE statement with multiple operations, the order of execution is not explicitly guaranteed by the documentation. While MySQL generally processes these operations in the order they are specified, relying on this behavior is not advisable for critical operations where the sequence is important.
Given this ambiguity, for operations where the order is crucial—such as adding a composite index before dropping an existing single-column index to ensure query performance is maintained—it is recommended to execute these actions in separate ALTER TABLE statements. This approach ensures that each operation is completed successfully before the next one begins, thereby minimizing potential performance issues.
In MySQL 8.0 and later, the introduction of Online Data Definition Language (DDL) operations has significantly improved the ability to perform schema modifications with minimal locking and downtime. These enhancements allow for many alterations, such as adding or dropping indexes, to be executed without requiring a full table rebuild or extensive locking, thereby reducing the impact on concurrent data manipulation operations.