首页 > 解决方案 > Chunk vs Spring Batch Size JdbcBatchItemWriter (namedParameterJdbcTemplate.batchUpdate)

问题描述

我正在处理 csv 文件中的 1,000 条记录。我想每批提交 100 条记录

Option#1 - chunk(100) and in JDBCWriter - batch.update() of the incoming list
Option#2 - Don't specify chunk rather in JDBCWriter - batchUpdate for each batch size
           by processing the entire 1,000 records

哪个是最好的和好的做法?

谢谢

标签: spring

解决方案


推荐阅读