[SERVER-3127] ability to explain a distinct query Created: 20/May/11  Updated: 12/Jul/16  Resolved: 21/May/11

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: 1.8.0
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Alvin Richards (Inactive) Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Improvement:
Would like to understand the query plan for distinct queries, e.g.

> db.blogs.distinct("author")
[ null, "jim" ]

> db.blogs.distinct("author").explain()



 Comments   
Comment by Craig Younkins [ 14/Oct/11 ]

Note that Eliot's comment refers to stats when running distinct in the form of db.runCommand(

{ distinct: 'blogs', key: 'author'}

)

Comment by Eliot Horowitz (Inactive) [ 21/May/11 ]

In 1.9.0 the stats field in the distinct command result tells you which index was used if any.

Generated at Thu Feb 08 03:02:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.