It doesn't actually send all the data at once. If you profile the event I
think you will find a series of 1000 calls to the database to do the updates
or inserts. That's a lot of network traffic. Is this .net? If so how are
the updates or inserts being done? Is it a sp? Do you have SET NOCOUNT ON
at the beginning of the SP?
It's done in VB6. I'm not using a SP. I open a recordset, disconnect
it, do my additions/updates then re-connect it and use UpdateBatch,
which I thought did all the data at once. If I were to just make one
massive insert statement, then use DBConnection.execute("INSERT
INTO.....") would that be faster? Any other suggestions?
Thanks!
Andrew J. Kelly - 27 Jan 2006 12:25 GMT
If the reasons for the speed issues are related to so many round trips this
may in deed be faster. You might want to look at using sp's in either case
so you can get some query plan reuse. But you need to test it to see and I
would suggest running a trace to see exactly what is happening.

Signature
Andrew J. Kelly SQL MVP
> It's done in VB6. I'm not using a SP. I open a recordset, disconnect
> it, do my additions/updates then re-connect it and use UpdateBatch,
> which I thought did all the data at once. If I were to just make one
> massive insert statement, then use DBConnection.execute("INSERT
> INTO.....") would that be faster? Any other suggestions?
> Thanks!