mybatis如何高效插入 mybatis如何高效插入
发布时间
阅读量:
阅读量
一、思路
- 1.java代码分页插入
- 2.mybatis批量插入
- 3.若需实现“存在则跳过插入”的逻辑,可采用以下方式
insert ignore into
替换
select
from
dual
where not exists
二、ignore和 where not exists效率
在相同条件下(电脑处理时存在轻微误差),ignore相较于where not exists的执行速度提升了40秒
ignore的执行时间

where not exists语句的执行耗时

三、代码片段
1.mybatis的ignore插入
<insert id
全部评论 (0)
还没有任何评论哟~
