Aggregation $group with 10 000 000 documents

If you have an index on that, then sort before you group by that field