-
Notifications
You must be signed in to change notification settings - Fork 753
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
feat(query): add plan cache #16333
feat(query): add plan cache #16333
Conversation
Docker Image for PR
|
Docker Image for PR
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need unit tests to verify
- get plan from cache
- if the table structure changed, can't get plan from cache?
The setting is default enabled, so logictest covered both issues. |
It would be better to add some new logic tests for this PR to ensure it remains unbreakable in the future, as we’re not sure if the existing tests cover this PR or if those tests might change later on. |
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
Add plan cache, queries will reuse the plan from cache if source plan is not changed (snapshot is not changed).
This cache is similar to Oracle's Global Plan Cache, but it's stored as LRU cache in memory.
Also, fix the name resolution issue of #16294
fixes #16294
Tests
Type of change
This change is