开始的sql语句如下:INSERT table_? (column1,column2) VALUES(?,?),
_使用DBUtils的batch()批量插入,用到PrepareStatement,异常信息Parameter index out of range (122 > number of parameters, which is 121),异常太多了就不贴出来了。
后来为了防止重复插入,使用了on duplicate key update:
insert table_? (column1,column2) values(?,?) on duplicate key update column1=?
结果就正常了,批处理的执行速度要稍慢,不是稍慢,是很慢
请大神给个解释谢谢