Click to See Complete Forum and Search --> : Which is the fastest way to send data to sql server


cmrhema
August 22nd, 2008, 07:23 AM
Hi,

We are receiving huge number of data thro sockets, which we write up in a Message Queue. Thereafter we take all the values from the Queue and write up into the database.

However we notice that there is some data loss when we send huge data. We tested out with 1,000,000 records. We recieved these records within 2 minutes, and we wrote all the data from the queue to the database (Kindly note that both are different exe, but both will run and has to run simultaneously), it took some 20 minutes but wrote only 993,903 records, Whereas we received all the records in the text file.

So is there any faster way to write up all records into database.

We at present send using stored procedure.

Please let me know if there are any ways to send data faster to SQL SERVER from asp.net C#.

Regards

cmrhema

eclipsed4utoo
August 30th, 2008, 09:19 PM
post your code. maybe there is some optimizations you can do.

dglienna
August 30th, 2008, 09:32 PM
You should be using BATCH Update's, rather than each record separately. Or else, process the text file using SQL.