How to store the real time information efficiently into database -
Question
-
Hello all,
I am developing a windows application using c# where I am getting the real fourth dimension information from the server ,the maximum number of data for a particular item in i second will be 65 information and there may be chances of more thou items .
So , what I demand is the data for all the items should be logged into database without any loss of information which the server gives.
At that place is a datatable for each item to store its ain data ,there is no trouble in my awarding till the data stores into the datatable and I want to utilize threading efficiently to store these information from datatable into database(My SQL and Ms SQL) table.
Delight anyone assist me in doing this efficiently without whatever functioning issues similar CPU usage,Memory leaks etc...
Cheers,
Prabhakaran.K
Answers
-
Ah...sounds to me a large enquire in a curt question and I dubiety if the answer is going to be specific (unless yous narrow downward/tweak question's scope by providing farther inputs). I would recommend studying and making use of .NET Framework'southward Task Parallel Library to serve your purpose. Especially, if LINQ delights y'all and you have the liberty to use information technology in your awarding y'all may want to take deep dive of PLINQ and to get quickly started y'all may jump onto PLINQ Data Sample.
HTH
Sameer
If this answers your question, delight Mark it as Answer. If this post is helpful, please vote as helpful.
- Proposed every bit reply past Thursday, September thirteen, 2012 7:38 AM
- Marked as answer by Jason Dot Wang Midweek, September 19, 2012 9:31 AM
-
- Proposed equally respond by Jason Dot Wang Th, September xiii, 2012 vii:38 AM
- Marked as answer by Jason Dot Wang Wednesday, September nineteen, 2012 9:31 AM
-
Let me encounter if I have understood the problem:
Y'all have an in-memory DataTable which is loaded with data that yous want to store in a database server. You lot desire to practise this efficiently without imposing a significant load on your client, because it is simultaneously receiving alive information which yous don't want to lose.
My suggested approach:
Employ one thread for receiving the live data and storing it in the DataTable. As shortly you take completed loading this DataTable, start a new thread for uploading its contents into the database server, while the main thread continues to receive information into some other separate DataTable. The code that uploads the datatable into the server could utilize a SqlBulkCopy object, which can efficiently ship the whole table to the server.
- Edited by Alberto Poblacion MVP Wednesday, September 12, 2012 six:31 AM
- Proposed every bit answer by Jason Dot Wang Thursday, September xiii, 2012 7:38 AM
- Marked every bit respond by Jason Dot Wang Wednesday, September 19, 2012 ix:31 AM
Which Database To Use For Storing Real Time Data,
Source: https://social.msdn.microsoft.com/Forums/en-US/3dd626e6-5096-4b22-8d85-be5b47fa89f6/how-to-store-the-real-time-data-efficiently-into-database?forum=csharpgeneral
Posted by: bakerbeforning1959.blogspot.com
0 Response to "Which Database To Use For Storing Real Time Data"
Post a Comment