Answer the question
In order to leave comments, you need to log in
Collections List c# maximum length?
Good afternoon!
Please tell me how to solve the issue of processing more than a trillion values?
Storage takes place in NoSql LiteDb
If necessary, I extract data and I need to process it, but I wondered if I would have more than a quadrillion data? The server generates packets like all the rules using the uint value is enough for a long time.
But when receiving data from the database, if an overflow occurs and I cannot pull it into the collection, who knows what to do?
At least a hint where to look ...
I save the data to the database
Curr c = p.curr.Dequeue();
lock (p.locker)
{
using (var db = new LiteDatabase(@"MyData.db"))
{
var col = db.GetCollection<Curr>("currency");
col.Insert(c);
}
}
List<Curr> d;
lock (p.locker)
{
using (var db = new LiteDatabase(@"MyData.db"))
{
ILiteCollection<Curr> currDat = db.GetCollection<Curr>("currency");
d = currDat.FindAll().ToList();
}
}
List<Curr> d;
Answer the question
In order to leave comments, you need to log in
When requesting data, do not do ToList - leave it in IQueryable for further selections.
Then it will be possible to make a selection + pagination, through
d.Where(...).Take(...).Skip(...) , whereIQueryable<Curr> d
0) Everything depends on the available RAM.
1) If you want to show them all to the user, then he does not need these trillions of your values, he does not even need a thousand.
2) If possible, do all the data processing logic on the SQL server.
3) Pagination in SQLiteSELECT * FORM t LIMIT сколько, начиная_от_куда
For show: the maximum length is limited by the indexer type, i.e. 2147483647 (int32).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question