|
The following is the explain output for the 4.0.10 reproduction. We are suspicious that this plan has no fetch stage, which would be required to disambiguate whether the index key represents an actual null value or a missing field.
{
|
"stages": [{
|
"$cursor": {
|
"query": {
|
"$and": [
|
{
|
"$or":
|
[{"obj.obj.obj.str": {"$not": {"$in": []}}}, {"obj.date": {"$nin": []}}]
|
},
|
{
|
"obj.obj.obj.obj.str":
|
{"$not": {"$lte": "Integration Money Market Account Direct"}}
|
}
|
]
|
},
|
"fields": {"obj.obj.obj.obj.str": 1, "_id": 0},
|
"queryPlanner": {
|
"plannerVersion": 1,
|
"namespace": "test.test",
|
"indexFilterSet": false,
|
"parsedQuery": {
|
"$and": [
|
{
|
"$or": [
|
{"obj.date": {"$not": {"$in": []}}},
|
{"obj.obj.obj.str": {"$not": {"$in": []}}}
|
]
|
},
|
{
|
"obj.obj.obj.obj.str":
|
{"$not": {"$lte": "Integration Money Market Account Direct"}}
|
}
|
]
|
},
|
"winningPlan": {
|
"stage": "PROJECTION",
|
"transformBy": {"obj.obj.obj.obj.str": 1, "_id": 0},
|
"inputStage": {
|
"stage": "OR",
|
"inputStages": [
|
{
|
"stage": "IXSCAN",
|
"keyPattern": {"obj.obj.obj.obj.str": 1, "obj.obj.obj.str": 1},
|
"indexName": "obj.obj.obj.obj.str_1_obj.obj.obj.str_1",
|
"isMultiKey": false,
|
"multiKeyPaths": {"obj.obj.obj.obj.str": [], "obj.obj.obj.str": []},
|
"isUnique": false,
|
"isSparse": false,
|
"isPartial": false,
|
"indexVersion": 2,
|
"direction": "forward",
|
"indexBounds": {
|
"obj.obj.obj.obj.str": [
|
"[MinKey, \"\")",
|
"(\"Integration Money Market Account Direct\", MaxKey]"
|
],
|
"obj.obj.obj.str": ["[MinKey, MaxKey]"]
|
}
|
},
|
{
|
"stage": "IXSCAN",
|
"keyPattern": {"obj.obj.obj.obj.str": 1, "obj.date": 1},
|
"indexName": "obj.obj.obj.obj.str_1_obj.date_1",
|
"isMultiKey": false,
|
"multiKeyPaths": {"obj.obj.obj.obj.str": [], "obj.date": []},
|
"isUnique": false,
|
"isSparse": false,
|
"isPartial": false,
|
"indexVersion": 2,
|
"direction": "forward",
|
"indexBounds": {
|
"obj.obj.obj.obj.str": [
|
"[MinKey, \"\")",
|
"(\"Integration Money Market Account Direct\", MaxKey]"
|
],
|
"obj.date": ["[MinKey, MaxKey]"]
|
}
|
}
|
]
|
}
|
},
|
"rejectedPlans": []
|
},
|
"executionStats": {
|
"executionSuccess": true,
|
"nReturned": 1,
|
"executionTimeMillis": 1,
|
"totalKeysExamined": 2,
|
"totalDocsExamined": 0,
|
"executionStages": {
|
"stage": "PROJECTION",
|
"nReturned": 1,
|
"executionTimeMillisEstimate": 0,
|
"works": 4,
|
"advanced": 1,
|
"needTime": 2,
|
"needYield": 0,
|
"saveState": 1,
|
"restoreState": 1,
|
"isEOF": 1,
|
"invalidates": 0,
|
"transformBy": {"obj.obj.obj.obj.str": 1, "_id": 0},
|
"inputStage": {
|
"stage": "OR",
|
"nReturned": 1,
|
"executionTimeMillisEstimate": 0,
|
"works": 4,
|
"advanced": 1,
|
"needTime": 2,
|
"needYield": 0,
|
"saveState": 1,
|
"restoreState": 1,
|
"isEOF": 1,
|
"invalidates": 0,
|
"dupsTested": 2,
|
"dupsDropped": 1,
|
"recordIdsForgotten": 0,
|
"inputStages": [
|
{
|
"stage": "IXSCAN",
|
"nReturned": 1,
|
"executionTimeMillisEstimate": 0,
|
"works": 2,
|
"advanced": 1,
|
"needTime": 0,
|
"needYield": 0,
|
"saveState": 1,
|
"restoreState": 1,
|
"isEOF": 1,
|
"invalidates": 0,
|
"keyPattern": {"obj.obj.obj.obj.str": 1, "obj.obj.obj.str": 1},
|
"indexName": "obj.obj.obj.obj.str_1_obj.obj.obj.str_1",
|
"isMultiKey": false,
|
"multiKeyPaths": {"obj.obj.obj.obj.str": [], "obj.obj.obj.str": []},
|
"isUnique": false,
|
"isSparse": false,
|
"isPartial": false,
|
"indexVersion": 2,
|
"direction": "forward",
|
"indexBounds": {
|
"obj.obj.obj.obj.str": [
|
"[MinKey, \"\")",
|
"(\"Integration Money Market Account Direct\", MaxKey]"
|
],
|
"obj.obj.obj.str": ["[MinKey, MaxKey]"]
|
},
|
"keysExamined": 1,
|
"seeks": 1,
|
"dupsTested": 0,
|
"dupsDropped": 0,
|
"seenInvalidated": 0
|
},
|
{
|
"stage": "IXSCAN",
|
"nReturned": 1,
|
"executionTimeMillisEstimate": 0,
|
"works": 2,
|
"advanced": 1,
|
"needTime": 0,
|
"needYield": 0,
|
"saveState": 1,
|
"restoreState": 1,
|
"isEOF": 1,
|
"invalidates": 0,
|
"keyPattern": {"obj.obj.obj.obj.str": 1, "obj.date": 1},
|
"indexName": "obj.obj.obj.obj.str_1_obj.date_1",
|
"isMultiKey": false,
|
"multiKeyPaths": {"obj.obj.obj.obj.str": [], "obj.date": []},
|
"isUnique": false,
|
"isSparse": false,
|
"isPartial": false,
|
"indexVersion": 2,
|
"direction": "forward",
|
"indexBounds": {
|
"obj.obj.obj.obj.str": [
|
"[MinKey, \"\")",
|
"(\"Integration Money Market Account Direct\", MaxKey]"
|
],
|
"obj.date": ["[MinKey, MaxKey]"]
|
},
|
"keysExamined": 1,
|
"seeks": 1,
|
"dupsTested": 0,
|
"dupsDropped": 0,
|
"seenInvalidated": 0
|
}
|
]
|
}
|
},
|
"allPlansExecution": []
|
}
|
}
|
}],
|
"ok": 1
|
}
|
|