Faster (more scalable) DataSet.Merge?

后端 未结 5 876
孤街浪徒
孤街浪徒 2021-01-25 11:52

We use strongly typed DataSets in our application. When importing data we use the convenient DataSet.Merge() operation to copy DataRows from one DataSet to another.

5条回答
  •  遇见更好的自我
    2021-01-25 12:17

    The obvious answer is 'do it in the DB' -- I'll assume it's not applicable in your case.

    You should try to use a row loop. This can be quite performant if the tables you are merging are sorted.

    http://en.wikipedia.org/wiki/Merge_algorithm

提交回复
热议问题