Home > Net >  The Entity Framework to map the SQL database, an efficient method of writing
The Entity Framework to map the SQL database, an efficient method of writing

Time:10-08

Desktop application UI will start three sub threads, each thread can produce about 20 times per second, change of state, is at the moment, I didn't meet 1 time writing a database, a second write about 60,

I also consider the record to the list first, and then once every 10 seconds to write the database, and can reduce the overhead of procedures to do so?

Followed by the list whether to add the lock, or writing, will lose the data?

Finally want to ask, what is the best way to? thank you

CodePudding user response:

I feel into the Queue might be better, and then write a background thread, take the inside of the Queue data regularly, as to how much a take a inserted into the database and look at the situation

CodePudding user response:

Records to the cache,
A period of time, cache the inserted into the database,
  •  Tags:  
  • C#
  • Related