0
点赞
收藏
分享

微信扫一扫

使用mybatis plus updateBatchById接口超级慢 解决方案

眸晓 2022-03-30 阅读 92
java后端

调用mybatisplus 批量更新接口,超级慢,主要是数据量大,就是updateBatchById这个接口,一个接口用时8s ,基本用时都在这个方法上面了,于是自己写了sql,问题解决!

第二种方法:在mysql配置面加上rewriteBatchedStatements=true

 url: jdbc:mysql://localhost:3306/xxxx?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=true&rewriteBatchedStatements=true

举报

相关推荐

0 条评论