[SERVER-18468] Include query planning details on query log lines Created: 14/May/15 Updated: 15/May/18 Resolved: 02/Feb/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Diagnostics, Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.5, 3.3.2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kevin Pulo | Assignee: | David Storch |
| Resolution: | Done | Votes: | 0 |
| Labels: | code-only | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Backport Completed: | |||||||||||||||||
| Sprint: | Query F (02/01/16), Query 10 (02/22/16) | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
The work completed for this ticket was to add two new fields to the slow query log lines and to the entries in the system.profile collection:
Original DescriptionCurrently when looking at a query log line it's impossible to tell whether or not query planning happened. This makes it hard to know if the query was slow for inherent reasons, or slow because planning occurred (and maybe many plans were tried). It would be great if the query log line could indicate whether or not query planning happened, and if so some basic stats about the planning stage, e.g. number of plans run, the w value of the winning (cached) plan (i.e. the number of "work"s required for the plan to win), whether or not the plan was cached (since sometimes it's not), etc. For example something like (spaces added for clarity only):
|
| Comments |
| Comment by Githook User [ 18/Mar/16 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: (cherry picked from commit be9dbd36a1dc86249601252b37d00b046f4a6629) |
| Comment by Githook User [ 02/Feb/16 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: |