[SERVER-41343] Add parameter for explain() to bound the trial phase Created: 28/May/19 Updated: 06/Dec/22 Resolved: 20/Jun/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Chris Harris | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query
|
||||||||
| Participants: | |||||||||
| Case: | (copied to CRM) | ||||||||
| Description |
|
Presently, all verbosity modes for explain() invoke the query planner. This means that the operation is subject to the general trial phase termination logic. In some cases, such as when SERVER-31078 is encountered, explain() can run for an extended period of time without returning results. This behavior can be undesirable when attempting to gather information from a production environment. We should consider introducing a new parameter to explain() which could be used to bound the maximum amount of work done during the trial phase. This could be used to alleviate concerns regarding the impact of gathering explain() output in certain situations. While usage of this parameter could result in different plan selection than normal due to the sample size, it is likely generally desirable to be able to gather that output rather than none at all. |
| Comments |
| Comment by Craig Homa [ 20/Jun/19 ] |
|
Although we might consider something like this in the future, this is immediately achievable with maxTimeMS. For users who want to see all candidate plans without spending the resources to select a winner, we have an open feature request in SERVER-17009. |