摘要: 同种方式适用update批量操作,与单条操作相比效率提高了三分之二。 此方式需要注意的是:不要一次性提交太多条数据,拼接后的sql过长,可能会导致语句无法执行。 insert、update语句就是常规单条操作写法。 SqlSession sqlSession = sqlSessionFactory. 阅读全文
posted @ 2020-06-20 11:03 铜丝儿 阅读(3183) 评论(0) 推荐(0) 编辑
摘要: //多个线程跑同一个任务,参数不同 int thread = Integer.parseInt(2); int threadSize = 3000; ExecutorService eService = Executors.newFixedThreadPool(thread); //创建一个线程池 阅读全文
posted @ 2020-06-20 10:42 铜丝儿 阅读(171) 评论(0) 推荐(0) 编辑