In memory data access

  • Thread starter Thread starter martyn_wynne
  • Start date Start date
M

martyn_wynne

I have 3 fields, SecurityID (int), Price (decimal) and DateStamp
(DateTime), up until now i've been recording the price in a SQL table
and reading it out. The reading is fine, but the boxes are really
stuggling with the writing, the Avg. Disk Queue Length is bordering on
a bottle neck.

So, i want to have a Windows Service keep this in memory and respond to
remote calls to set and get the data. Persistance is not required.

Now, which form shall i store the info in, DataTable, a collection of
objects, xml, or some other?

I want pure speed in and out.


Thanks in advance.
 
If you want to maximize speed, use an array of objects. If that's
still not fast enough, you can use unsafe code so the array is not
garbage collected. I think that will give you the maximum possible
performance.
 
Back
Top