20万导出只需几秒,听说100万数据导入也就几十秒
?
1.导出数据,转为.txt文件
select * from visits where month(created_at)=6 into outfile 'f:\\visits.txt' fields terminated by ',';
?
?
2..txt文件导入数据
load data infile 'f:\\visits.txt' into table visits fields terminated by ','
?
?