planner: treat plans with different in-list length as the same one in plan cache
Open
epic/memory-management
epic/plan-cache
sig/planner
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
Currently, for 2 'same' queries with different in-list lengths, plan cache will generate and cache different plans for them.
For example, plan cache will cache 2 plans for the 2 'same' queries below:
`select * from t where a in (1, 2)`, `select * from t where a in (1, 2, 3)`.
This strategy can cause lots of memory usage:

Contributor guide
Assessment
This issue has not been assessed yet.