rewriteBatchedStatements=true // 把这个参数加到数据库链接的后面 加上 ?号
url = jdbc:mysql://localhost:3306/blog?rewriteBatchedStatements=true
使用 perpareStatement 的 addBatch 方法 保存到集合中
再使用, executeBatch() 执行批处理
System.currentTimeMillis() 得到毫秒值
实例代码如下
rewriteBatchedStatements=true // 把这个参数加到数据库链接的后面 加上 ?号
url = jdbc:mysql://localhost:3306/blog?rewriteBatchedStatements=true
使用 perpareStatement 的 addBatch 方法 保存到集合中
再使用, executeBatch() 执行批处理
System.currentTimeMillis() 得到毫秒值
实例代码如下