Is bulk update faster than single update in db2?

后端 未结 5 1334
星月不相逢
星月不相逢 2021-01-25 00:59

I have a Table with 10 columns and in that table I have thousands/millions of rows. In some scenario, I want to update more than 10K records at a time. currently my scenario cod

5条回答
  •  渐次进展
    2021-01-25 01:37

    You will definitely see a performance improvement, because you will reduce the number of roundtrips.

    However, this approach does not scale very well; thousands of ID's in one statement could get a bit tricky. Also, there is a limit on the size of your query (could be 64k). You could consider to 'page' through your table and update - say - 100 records per update statement.

提交回复
热议问题