set_unique

来源:互联网 发布:单片机红绿灯电路图 编辑:程序博客网 时间:2024/06/06 20:38

导入数据的一个常用优化是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.

原创粉丝点击