SQL Server Maximum rows that can be inserted in a single insert statment

前端 未结 5 446
悲哀的现实
悲哀的现实 2020-12-03 21:04

I want to do a batch insert, similar to this question

How to do a batch insert in MySQL

  1. What is the limitation is SQL Server on how many rows can b

5条回答
  •  被撕碎了的回忆
    2020-12-03 21:20

    Although the max is 1000, it's been demonstrated that performance begins to diminish at much smaller numbers. Eugene Philipov wrote a great article exploring this very topic:

    https://www.red-gate.com/simple-talk/sql/performance/comparing-multiple-rows-insert-vs-single-row-insert-with-three-data-load-methods/

    To summarize, the author did some very well-designed experimenting and found a sweet spot at around 25. YMMV.

提交回复
热议问题