Aggregate counts by day, months, year on a collection with an indexed timestamp field

But why does it say that the projection takes 378ms and the IXSCAN takes 1.2s, BUT the execution time takes 31 seconds?

Thanks for the other suggestions, I’ll implement them.