[SERVER-78113] not cache meaningless plan, it will increased memory overhead and increase computing overhead. Created: 15/Jun/23 Updated: 13/Oct/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | y yz | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | pull-request | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Assigned Teams: |
Query Optimization
|
| Participants: |
| Description |
|
when the mode is PlanCachingMode::AlwaysCache or PlanCachingMode::SometimesCache, there is a special case. In this case, if we cache the plan, it will increased memory overhead. when the cached plan stage pick best plan, it will trigger replan. this will increase computing overhead. |
| Comments |
| Comment by y yz [ 13/Oct/23 ] |
|
Do we have the conclusion of this question? If so, we can synchronize it. Thank you.
thanks. |
| Comment by y yz [ 15/Jun/23 ] |
|
the code address: https://github.com/mongodb/mongo/pull/1555 |
| Comment by y yz [ 15/Jun/23 ] |
|
|
| Comment by y yz [ 15/Jun/23 ] |
|
if the winning index's advanced = 0 && works == 1 && isEOF == true, which means we didn't get any data to rank score, all candidates score is same. the score of the calculation is meaningless.
In this case, if we cache the plan, it will increased memory overhead. when the cached plan stage pick best plan, it will trigger replan. this will increase computing overhead. |