-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.4.6
-
Component/s: Aggregation Framework
-
None
-
ALL
I have a collection with about 75.000 docs
Indexes:
ad.guid_1
unitUuid_1
This query takes about 1-2 milliseconds and gives 1 hit:
db.getCollection('xxx').aggregate([ { $match: { "ad.guid": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" } } ])
This query takes about 180 milliseconds and gives 1 hit:
db.getCollection('xxx').aggregate([ { $match: { "ad.guid": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" } }, { $sort: { "unitUuid": 1 } } ])
Why is it so slow with $sort?
- duplicates
-
SERVER-7568 Aggregation framework favors non-blocking sorts
- Closed