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

前端 未结 8 1189
予麋鹿
予麋鹿 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:15

    BCP - it's a pain to set up, but it's been around since the dawn of DBs and it's very very quick.

    Unless you're inserting data in that order the 3-part index will really slow things. Applying it later will really slow things too, but will be in a second step.

    Compound keys in Sql are always quite slow, the bigger the key the slower.

提交回复
热议问题