[SERVER-3443] alter profiler to capture plan used when query ran Created: 18/Jul/11 Updated: 12/Jul/16 Resolved: 14/Jan/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 2.5.5 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Kenny Gorman | Assignee: | hari.khalsa@10gen.com |
| Resolution: | Done | Votes: | 5 |
| Labels: | query_triage | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
1.8.1 |
||
| Issue Links: |
|
||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
I know this may be difficult or require a query to be double run, but it would be great to have the plan in the profiler. Especially the nYields field. > db.contact.find( {userid:"000020862072"}).explain() } |
| Comments |
| Comment by hari.khalsa@10gen.com [ 14/Jan/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
In the case above, there was no index used. Here is an example with an index:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Christopher Price [ 14/Jan/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Where is the name of the index that was used? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 14/Jan/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'hkhalsa', u'name': u'Hari Khalsa', u'email': u'hkhalsa@10gen.com'}Message: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Pasette (Inactive) [ 14/Jan/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Would look like this. Note the new field "execStats":
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Christopher Price [ 13/Jan/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Could we see sample output before this is implemented? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Crosta [ 20/Sep/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Would be great to see nScannedObjects, cursor, and (for BTree Cursors) the index(es) used | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dwight Merriman [ 19/Jul/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
yes a subset would be good. assigning to dan until assigned elsewhere. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eliot Horowitz (Inactive) [ 19/Jul/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
We probably don't want the whole thing as that is a bit expensive. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kenny Gorman [ 18/Jul/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sorry, I will try to be more explicit. It would be great to see the explain() output in the db.system.profile collection. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dwight Merriman [ 18/Jul/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
i didn't quite understand what the request is, what is new there vs. already there. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kenny Gorman [ 18/Jul/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
OK, will create SERVER in the future... |