>I use the following syntax to insert in batch:
>
>
>INSERT INTO Search
> (NoThread,AddUser)
>VALUES
> (1505069,1),
> (1505024,1),
> (1501270,1),
> (1501269,1),
> (1501268,1),
> (1498786,1)
>
>
>Lets assume I have 134 records to insert here. The time to insert those 134 records is 0.0156. If I have 2000 records to insert, this is still extremely fast.
>
>However, in another application I have, the list of fields to insert is about 20 and contains some long character fields such as FirstName at 25 characters, LastName at 25 characters and Company at 100 characters. The time to insert 1000 records is at 20 seconds.
>
>Why is that such a big difference? Is the insert in batch affected by the number of fields?
Yes, it may be affected by the number and size of the fields. Try splitting the batches to, say, 500 records and compare the speed.
If it's not broken, fix it until it is.
My Blog