Changing a table with many rows can take a lot of time (although if the columns involved are not indexed, it can be trivial).
If you specifically want to avoid using the ALTER TABLE syntax created specifically for this purpose, you can always create a table with an almost identical structure (but a different name) and copy all the data into it, for example:
CREATE TABLE `your_table2` ...; -- (using the query from SHOW CREATE TABLE `your_table`, -- but modified with your new column changes) LOCK TABLES `your_table` WRITE; INSERT INTO `your_table2` SELECT * FROM `your_table`; RENAME TABLE `your_table` TO `your_table_old`, `your_table2` TO `your_table`;
For some ALTER TABLE queries, the above can be quite fast. However, for a simple change to the column name, this may be trivial. I could try to create an identical table and make changes to it to find out how much time you actually look.
source share