Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Duplicate
-
2.2.3, 2.4.1
-
None
-
None
-
ALL
-
Description
I am unable to find any way to get the query plan and stats for a distinct query in mongo shell. explain() is not valid to chain onto distinct(). The 2.2 documentation says (http://docs.mongodb.org/v2.2/reference/command/distinct/) says that "the command returns a document that contains an array of the distinct values as well as the query plan and status."
mongos> db.actions.distinct("a",
{...}).explain()Mon Mar 25 14:24:35 TypeError: db.actions.distinct("a", {...}
).explain is not a function (shell):1
mongos> db.runCommand({distinct:'actions', key:"a", query:{...}})
{ "values" : [ "love" ], "ok" : 1 }Attachments
Issue Links
- duplicates
-
SERVER-15020 Implement explain for the distinct command
-
- Closed
-
- related to
-
SERVER-10448 Revamp explain() formatting
-
- Closed
-