mysql百万级别数据批量插入
除去程序优化,在连接url上面写上rewriteBatchedStatements=true开启批量插入,mysql默认是不支持批量操作的
url=jdbc:mysql://127.0.0.1:3306/scada_1_2?rewriteBatchedStatements=true
百万数据秒级插入,亲测有效!
除去程序优化,在连接url上面写上rewriteBatchedStatements=true开启批量插入,mysql默认是不支持批量操作的
url=jdbc:mysql://127.0.0.1:3306/scada_1_2?rewriteBatchedStatements=true
百万数据秒级插入,亲测有效!