CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2007
    Posts
    25

    Which is the fastest way to send data to sql server

    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

  2. #2
    Join Date
    Nov 2007
    Location
    .NET 3.5 / VS2008 Developer
    Posts
    624

    Re: Which is the fastest way to send data to sql server

    post your code. maybe there is some optimizations you can do.

  3. #3
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Which is the fastest way to send data to sql server

    You should be using BATCH Update's, rather than each record separately. Or else, process the text file using SQL.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured