What's the fastest way to bulk insert a lot of data in SQL Server (C# client)

前端 未结 8 1193
予麋鹿
予麋鹿 2020-11-28 22:39

I am hitting some performance bottlenecks with my C# client inserting bulk data into a SQL Server 2005 database and I\'m looking for ways in which to speed up the process.

8条回答
  •  迷失自我
    2020-11-28 23:17

    Yes your ideas will help.
    Lean on option 1 if there are no reads happening while your loading.
    Lean on option 2 if you destination table is being queried during your processing.

    @Andrew
    Question. Your inserting in chunks of 300. What is the total amount your inserting? SQL server should be able to handle 300 plain old inserts very fast.

提交回复
热议问题