-
Type: Bug
-
Resolution: Won't Do
-
Priority: Minor - P4
-
Affects Version/s: None
-
Labels:None
AFAIK, back in the day db.find().explain() had an "indexOnly" attribute. That has been removed and now I am confused by the text for "Covered Queries" in https://docs.mongodb.com/manual/reference/explain-results/
An example would help.
Below is explain output for a query that it isn't index-only but that took me too long to figure out.
{ "queryPlanner" : { "plannerVersion" : 1, "namespace" : "ib.pi1", "indexFilterSet" : false, "parsedQuery" : { "customerid" : { "$lt" : 0 } }, "winningPlan" : { "stage" : "PROJECTION", "transformBy" : { "_id" : -1, "price" : 1, "customerid" : 1 }, "inputStage" : { "stage" : "FETCH", "filter" : { "customerid" : { "$lt" : 0 } }, "inputStage" : { "stage" : "IXSCAN", "keyPattern" : { "price" : 1, "customerid" : 1 }, "indexName" : "pc", "isMultiKey" : false, "multiKeyPaths" : { "price" : [ ], "customerid" : [ ] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 2, "direction" : "forward", "indexBounds" : { "price" : [ "[MinKey, MaxKey]" ], "customerid" : [ "[MinKey, MaxKey]" ] } } } }, "rejectedPlans" : [ ] }, "serverInfo" : { "host" : "nuc1", "port" : 27017, "version" : "3.4.6-1.7", "gitVersion" : "74b930309498503ee1c64d9a2526e45e2da464a2" }, "ok" : 1 }