Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
3.4.6
-
None
-
ALL
Description
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?
Attachments
Issue Links
- duplicates
-
SERVER-7568 Aggregation framework favors non-blocking sorts
-
- Closed
-