As others have argued, this depends on your environment, in particular on line volume and network latency.
Personally, I would start by setting the BatchSize property to 1000 lines and see how it works. If it works, I continue to double the number of lines (for example, to 2000, 4000, etc.) until I get a timeout.
Otherwise, if the timeout occurs at 1000, I reduce the number of lines by half (for example, 500) until it works.
In each case, I continue to double (if necessary) or halve (if not succeed) the difference between each of the last two sizes of the batch of purchases until I find a sweet spot.
Another factor to consider is how long it takes to copy one batch of lines. Timeouts will be executed if the batch of lines copied exceeds the BulkCopyTimeout property, which is 30 seconds by default. You can try doubling the BulkCopyTimeout property to 60 seconds. This allows a longer period of time for copying a large set of batch lines. For example, a packet of 50,000 lines can take about 40 seconds, exceeding only a 30-second period, so a load of 60 seconds can help in performance.
Ray Vega May 18 '11 at 18:13 2011-05-18 18:13
source share