[SERVER-12533] Include sort (spec) for sort stage in full explain output Created: 29/Jan/14  Updated: 09/Jul/16  Resolved: 14/Oct/14

Status: Closed
Project: Core Server
Component/s: Admin, Querying
Affects Version/s: 2.5.4
Fix Version/s: None

Type: Improvement Priority: Trivial - P5
Reporter: Craig Harris Assignee: David Storch
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-10472 find(a).sort(b,_id) doesn't use index... Backlog
related to SERVER-10448 Revamp explain() formatting Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

I expected/wanted to see the sort spec when running this:

db.temp.find( {a:1} ).limit(3).sort( {b:1, _id:1} ).explain(true)
...
        "stats" : {
                "type" : "SORT",
                "works" : 11,
                "yields" : 0,
                "unyields" : 0,
                "invalidates" : 0,
                "advanced" : 3,
                "needTime" : 7,
                "needFetch" : 0,
                "isEOF" : 1,
                "forcedFetches" : 0,
                "children" : [
                        {
                                "type" : "FETCH",
...



 Comments   
Comment by David Storch [ 14/Oct/14 ]

This information is present in the new explain format introduced under SERVER-10448. Closing as a duplicate.

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