[SERVER-54083] Include scores calculated by PlanRanker in explain "queryPlanner" output and/or "allPlansExecution" Created: 27/Jan/21 Updated: 29/Oct/23 Resolved: 11/Aug/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 5.1.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | Alice Doherty |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | Query Optimization 2021-07-12, Query Optimization 2021-07-26, Query Optimization 2021-08-09, QO 2021-08-23 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
One important use case for explain is determining why the system chose one candidate plan as the winner and rejected others. This information can currently derived from "allPlansExecution" output, but this requires some internal knowledge of how the PlanRanker's score calculation is implemented. Our internal Query Doctor tool, for example, calculates these scores itself (christopher.harris please correct me if this wrong). There is a risk that Query Doctor could end up diverging from the server's behavior with regards to plan score calculation, thereby misinterpreting the explain output. We should consider simplifying the situation by simply exposing the plan scores. These could be exposed alongside the "winningPlan" and each "rejectedPlan", as well as alongside each plan in the "allPlansExecution" section. Although these scores are very much subject to change (or even go away entirely) as the internals of the query optimization subsystem change, I don't see a harm in exposing them. This is especially true given that explain's output format is excluded from the stable API, and is subject to change as the implementation details of the query system change. |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 10/Aug/21 ] |
|
Author: {'name': 'Alice Doherty', 'email': 'alice.doherty@mongodb.com', 'username': 'alicedoherty'}Message: |