Mybatis 大数据量的批量insert解决方案

前言

通过Mybatis做7000+数据量的批量插入的时候报错了,error log如下:

   ,  
('G61010352', 
'610103199208291214',   
'学生52', 
'G61010350',
'610103199109920192',
'学生50',
'07',
'01',
'0104',
' ',
0,
' ',
' ',
current_timestamp,
current_timestamp
) 被中止,呼叫 getNextException 以取得原因。

    at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2743)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:411)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2892)
    at com.alibaba.druid.filter.FilterChainImpl.statement_executeBatch(FilterChainImpl.java:2596)
    at com.alibaba.druid.wall.WallFilter.statement_executeBatch(WallFilter.java:473)
    at com.alibaba.druid.filter.FilterChainImpl.statement_executeBatch(FilterChainImpl.java:2594)

    at com.alibaba.druid.filter.FilterAdapter.statement_executeBatch(FilterAdapter.java:2474)
    at com.alibaba.druid.filter.FilterEventAdapter.statement_executeBatch(FilterEventAdapter.java:279)
    at com.alibaba.druid.filter.FilterChainImpl.stateme
  • 20
    点赞
  • 84
    收藏
    觉得还不错? 一键收藏
  • 19
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 19
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值