MaxBatchSize for Insert?
Posted: Fri 19 Jun 2015 13:17
Hey
I have a question related to LinQ to MsSql.
I am creating about 20 000 records on the fly and use the following code to insert the data:
The SubmitChanges code Needs about 3 minutes to execute.
I took a look onto the MaxBatchSize Property. - This is set to 20
I tried now:
But without any Performance Upgrades.
Could you give me please some hints, how I can upscale the Batch Insertion!?
THX
I have a question related to LinQ to MsSql.
I am creating about 20 000 records on the fly and use the following code to insert the data:
Code: Select all
myDataContext.Table.InsertAllOnSubmit(locData)
myDataContext.SubmitChanges()
I took a look onto the MaxBatchSize Property. - This is set to 20
I tried now:
Code: Select all
Using myDataContext As New DataContext With {.MaxBatchSize = 1000}
myDataContext.Table.InsertAllOnSubmit(locData)
myDataContext.SubmitChanges()
End Using
Could you give me please some hints, how I can upscale the Batch Insertion!?
THX