How effective is executeBatch on a Prepared Statement?

前端 未结 5 789
执笔经年
执笔经年 2021-02-09 15:06

Subject to this question, asks it all:How effective is executeBatch method? Is there a performance benchmark, that says.. \'if you have 1000 records to be inserted, using a exec

5条回答
  •  面向向阳花
    2021-02-09 15:26

    In my experience, it is significantly faster - even if you are inserting/updating just a few records at a time. If you are doing more than one update, I would almost always recommend batching them if it makes sense.

    That said, you'd have to do some actual testing to figure out the performance improvement for your particular situation.

提交回复
热议问题