-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[RFC] Plan cache #2619
Comments
Do you consider the explicit usage like the |
I think you could cache the generated plan before CBO stage, and do CBO again for plan which instantiated from cache. |
Setting |
Just the same thing. Implicit usage is more user-friendly, I think. |
Yes, I think could provide both. The implicit mode is enable by flag, the explicit is enable by query directly. |
It can be considered, but will increase the complexity of the syntax. |
Out of date. |
Co-authored-by: dutor <[email protected]>
Summary
Cache historical execution plans to avoid replanning for the same/similar query.
Motivation
Avoid replanning to reduce the overhead of the planner and optimizer.
Usage explanation
Invisible to the user.
Design explanation
Hash the query statement.
Hash the normalized AST.
Cache elimination strategy.
Note: schema changes(such as index/constraint creation/removal) will flush the entire query plan cache.
Rationale and alternatives
Drawbacks
This may be a trade-off in the CBO scenario, which mean It may cause performance degradation of the execution plan.
Prior art
Unresolved questions
Future possibilities
The text was updated successfully, but these errors were encountered: