mysql - Altering the data type of a column in a HUGE table. Performance issues -


i want run on table:

alter table table_name modify col_name varchar(255) 

but table huge, has more 65m (65 million) rows. when execute, takes 50mins execute command. better way alter table?

well, need

 alter table table_name change col_name new_name varchar(255) 

but, right, takes while make change. there isn't faster way change table in mysql.

is concern downtime during change? if so, here's possible approach: copy table new one, change column name on copy, rename copy.

you have figured out routinely changing column names in tables in production system not idea.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -