有正在積極開發的開源數據庫的時間序列(.NET現在只),我寫的。它可以以「二進制平面文件」方式存儲大量(terrabytes)統一數據。所有用法都是面向流的(正向或反向)。我們積極將其用於我公司的股票蜱儲存和分析。
https://code.google.com/p/timeseriesdb/
// Create a new file for MyStruct data.
// Use BinCompressedFile<,> for compressed storage of deltas
using (var file = new BinSeriesFile<UtcDateTime, MyStruct>("data.bts"))
{
file.UniqueIndexes = true; // enforces index uniqueness
file.InitializeNewFile(); // create file and write header
file.AppendData(data); // append data (stream of ArraySegment<>)
}
// Read needed data.
using (var file = (IEnumerableFeed<UtcDateTime, MyStrut>) BinaryFile.Open("data.bts", false))
{
// Enumerate one item at a time maxitum 10 items starting at 2011-1-1
// (can also get one segment at a time with StreamSegments)
foreach (var val in file.Stream(new UtcDateTime(2011,1,1), maxItemCount = 10)
Console.WriteLine(val);
}
您可能正在尋求某種形式的合併方案。你可能會發現在這個相關的問題的討論有幫助:http://stackoverflow.com/questions/1248815/percentiles-of-live-data-capture/1249003#1249003 – 2009-08-26 13:56:12