$group and $count are so-called “blocking stages”, which means you need to wait for them to count (or group) ALL the results from the previous stage. This is expected behaviour.

Are you sure the query is actually completing after 500ms, and not just a cursor batch??

1 Like