Slow, Poor performance

Hello :wave: @Chris_Swainson,

Thank you for reaching out to the MongoDB Community forums!

Based on the aggregation pipeline you shared, it seems that you are trying to bucket the data with consecutive second intervals. However, to better understand the issue, could you please provide more details about your requirements and the expected output result?

It would be helpful if you could share the expected output example document. Additionally, please let us know which version of MongoDB you are using and the deployment environment (e.g., on-prem, MongoDB Atlas, or local).

Regarding your statement about having up to 400 aggregations, could you please clarify what exactly you mean? Any additional context or examples would be helpful.

Could you please give an example of the scenario that you have in mind?

Also, it would be helpful to know the volume of data you are working with and any indexes you have set up.

To read more about the Time Series, please refer to the following resources:

Best regards,
Kushagra