I create timeseries with following schema. If I have 90K+ TrendReadings I get the 16MB limit exception.
How to structure the trend POCO to avoid this? What are the best practices? I would need to search the timerange latter.
Thank you.
Schema:
db.trends.findOne()
{
_id: ObjectId("611bb0c404571e809dda5ab8"),
EntityId: Binary(Buffer.from("7cae6edc9167304a91f7052137f4bb36", "hex"), 3),
ExperimentId: ObjectId("611bb0c30000010001001e6e"),
TrendObjectId: ObjectId("611bb0c30000010001001e6e"),
Nsamples: 0,
Interval: 2,
UnitOfMeasure: '°C',
TrendReadings: [
{
TopicIndex: 0,
Reading: 15.4664096832275,
timestamp: ISODate("2013-04-25T19:51:05.000Z")
},
{ .. etc
C# code
foreach (var item in trendReadings.Values)
{
_TrendReadingsCollection2.InsertOne(item); //exception if item.Readings.Count > 90K
}