导入数据的一个常用优化是set_unique = 0;
但是如果在此时插入重复数据,会造成一下结果
首先清空+设置
导入内容
结果:为空,导入失败
结论:使用时确保数据准确
来自refrence manual :
For big tables, this saves a lot of disk I/O because InnoDB
can use its change buffer to write secondary index records in a batch. Be certain that the data contains no duplicate keys.