xjywp00 2019-06-27
alert table mytable engine = InnoDB;
使用工具将表保存到文件,打开文件修改表的存储引擎以及表名
执行语句
create table new_table like old_table;
alter table new_table engine=InnoDB;
insert into new_table select * from old_table如果数据量比较大,可以根据主键分批操作,如果有必要可以对原表加锁,保证新表与原表数据一致
start transaction;
insert into new_table select * from old_table where id between x and y;
commit;以上内容参考自《高性能mysql》