[SERVER-69774] Investigate caching prepared plans in SBE Created: 16/Sep/22 Updated: 14/Mar/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Kyle Suarez | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Execution
|
||||||||
| Sprint: | QE 2022-09-19 | ||||||||
| Participants: | |||||||||
| Story Points: | 20 | ||||||||
| Comments |
| Comment by Anna Wawrzyniak [ 29/Sep/22 ] |
|
Caching prepared plans is viable, but may require invasive PlanCache changes to productionalize.
A prototype using side cache, without eviction:
For fast id hack queries tested with the poc: And the difference becomes more significant the larger the query plan is. Investigated approaches: a) Store prepared plans in a LIFO pool that is stored as part of cached plan for plans eligible for pooling.
b) Store prepared plans in a separate cache representing a map plankey -> pool
|