<inrt id="inrtByBatch" parameterType="java.util.List"> BEGIN <foreach collection="list" item="item" parator=";"> INSERT INTO T_OPT_HANDOVERBILL_DETAIL (ID, HANDOVER_NO, WAYBILL_NO, TRANSPORT_TYPE, HANDOVER_GOODS_QTY, HANDOVER_WEIGHT, ACTUAL_WEIGHT,HANDOVER_VOLUME, ACTUAL_VOLUME, NOTES, GOODS_NAME, PACKING, BE_VALUABLE, RECEIVE_ORG_NAME, REACH_ORG_NAME,RECEIVER_NAME, DEST_REGION_NAME, GOODS_QTY, WAYBILL_FEE, DECLARATION_VALUE, CURRENCY_CODE, CREATE_TIME, ORIG_ORG_CODE, HANDOVER_TYPE, COD_AMOUNT, BE_JOIN_CAR, BE_FAST_GOODS, IS_INIT, WAYBILL_NOTES,TRANSPORT_TYPE_CODE, MODIFY_TIME) VALUES (#{item.id,jdbcType=VARCHAR}, #{item.handoverNO,jdbcType=VARCHAR}, #{item.waybillNO,jdbcType=VARCHAR}, #{ansportType,jdbcType=VARCHAR}, #{item.handoverGoodsQty,jdbcType=NUMERIC}, #{item.handoverWeight,jdbcType=NUMERIC}, #{item.actualWeight,jdbcType=NUMERIC}, #{item.handoverVolume,jdbcType=NUMERIC}, #{item.actualVolume,jdbcType=NUMERIC}, 六种物态变化 #{s,jdbcType=VARCHAR}, #{dsName,jdbcType=VARCHAR}, #{item.packing,jdbcType=VARCHAR}, #{item.beValuable,jdbcType=VARCHAR}, #{iveOrgName,jdbcType=VARCHAR}, #{achOrgName,jdbcType=VARCHAR}, #{iverName,jdbcType=VARCHAR}, #{item.destRegionName,jdbcType=VARCHAR}, #{dsQty,jdbcType=VARCHAR}, #{item.waybillFee,jdbcType=NUMERIC}, #{item.declarationValue,jdbcType=NUMERIC}, #{item.currencyCode,jdbcType=VARCHAR}, #{ateTime,jdbcType=DATE}, #{igOrgCode,jdbcType=VARCHAR}, #{item.handoverType,jdbcType=VARCHAR}, #{dAmount,jdbcType=NUMERIC}, #{item.beJoinCar,jdbcType=VARCHAR}, #{item.beFastGoods,jdbcType=VARCHAR}, #{item.isInit,jdbcType=VARCHAR}, #{item.waybillNotes,jdbcType=VARCHAR}, #{ansportTypeCode,jdbcType=VARCHAR}, #{difyTime,jdbcType=DATE}) </foreach> ;END;首先近义词 </inrt> |
public void inrtByBatch(List<HandOverBillDetailEntity> list) { long start = System.currentTimeMillis(); getSqlSession().inrt(NAME_SPACE + ".inrtByBatch", list); 启发的意思 long end = System.currentTimeMillis(); System.out.println("批量插入耗时:" + (end - start) + "ms"); } |
序号 | 数据条数 | 执行时间一 | 执行时间二 | 执行时间三 |
1 | 50 | 258ms | 63ms | 32ms |
2 | 100 | 826ms | 186ms | 83ms |
3 | 150 | 语句超字符上线,不支持 | ||
4 | 250 | 语句超字符上线,不支持 | ||
本文发布于:2023-07-24 05:55:39,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/fan/89/1094290.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |