I have a VB6 app connecting to a SQL Server 2005 db
I'm uploading about 15,000 records on a regular basis.
The records are not very long, mustly numeric.
Some records go into one table and some go into another.
Using two Conn.Execute statements for each set of data was just too slow, taking hours.
THen I wrote a stored procedure that did it, but that wasn't much faster.
Next I conctatenated entire records one after another with a unique identifier and wrote a stored procedure that uses Pat Index to split the record strings up and send each one to the original stored procedure.
That worked, but it always timed out. Obviously it would have taken hours to finish.
So lastly, I broke records into blocks of 50 records (the number I can count on to execute and not time out) and now I use a loop of 300 Conn.Execute statements to send each batch of 50 records to the Pat Index stored procedure.
Currently, this takes over two hours to complete.
Have I missed something that would be faster? I've heard people say Pat Index is slow, but I don't know another way to send multiple records up at a time. Also I don't know how to keep SQL Server from timing out on this enormous job.
Anybody?
Thanks.




Reply With Quote