TimeSeries Collection - Query Targeting: Scanned Objects / Returned has gone above 1000

Hi @Vatemecum

I believe a very similar question was answered by @Aasawari on TimeSeries last x documents please have a look at that thread and see if it helps your case.

Basically due to the way the time series collection is working currently, I think adding a timestamp window should make this better. For example, if you add {$match: {date_utc: {$gte: <some recent date time>}}} as the first stage of the pipeline, it should perform better.

If this doesn’t work, could you post the output of db.collection.explain('executionStats').aggregate(...) output, both before and after adding the timestamp window matching? Also some example documents will be helpful.

Best regards
Kevin

1 Like