Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

planner: treat plans with different in-list length as the same one in plan cache #42984

Open
qw4990 opened this issue Apr 12, 2023 · 1 comment
Assignees
Labels
epic/memory-management epic/plan-cache sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.

Comments

@qw4990
Copy link
Contributor

qw4990 commented Apr 12, 2023

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:
image

@qw4990 qw4990 added type/enhancement The issue or PR belongs to an enhancement. sig/planner SIG: Planner epic/plan-cache epic/memory-management labels Apr 12, 2023
@qw4990 qw4990 self-assigned this Apr 12, 2023
@fixdb
Copy link
Contributor

fixdb commented Nov 17, 2023

I think this has been addressed on master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic/memory-management epic/plan-cache sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

2 participants