Hey @Catotron_N_A,
Welcome to the MongoDB Community!
May I ask how big are the documents on average, and what it looks like? Could you share a sample of it?
When inserting data into a time series collection in MongoDB, the order of the document timestamps impacts performance and query efficiency.
Inserting in random timestamp order can cause many more buckets to be created than necessary. This is because one of the time series collection’s assumptions is that you’ll be inserting your data in a regular interval in a monotonically increasing time order.
To read more about the bucketing pattern, please refer to this post.
Based on my understanding you can consider:
- Setting up indexes on the timestamp/date fields for faster sorting.
- You can also consider the Clustered Collections.
In case you need further help, feel free to reach out to us.
Regards,
Kushagra