1.myisam
alter table table_name disable keys
loading data// insert
alter table table_name enable keys
2.innodb
set unique_checks=0 //关闭唯一校验 set autocommit=1 //关闭自动提交
1.myisam
alter table table_name disable keys
loading data// insert
alter table table_name enable keys
2.innodb
set unique_checks=0 //关闭唯一校验 set autocommit=1 //关闭自动提交
转载于:https://www.cnblogs.com/QQ1029173607/p/5383266.html