-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
ignore stmtClose to make sure smtPrepare can hit plan cache #31056
Labels
Comments
This was referenced Jan 7, 2022
This was referenced Jan 13, 2022
12 tasks
ti-chi-bot
pushed a commit
that referenced
this issue
Feb 22, 2022
12 tasks
ti-chi-bot
pushed a commit
that referenced
this issue
Feb 28, 2022
12 tasks
ti-chi-bot
pushed a commit
that referenced
this issue
Mar 7, 2022
12 tasks
This task has been finished by #32928. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Enhancement
It's not uncommon that real-world application will follow the stmtPrepare -> stmtExec -> stmtClose loop.
In TiDB, the stmtClose will evict the cached plan, and the following stmtPrepare need to recompile the plan, make the plan cache useless.
In Oracle, stmtClose only close the session local handle. The cached plan still exists the in the global cache shared pool, the following prepare call can still re-use the cached plan.
I propose adding a global variable, to ignore the stmtClose calls, so that the cached plan can be re-used.
The text was updated successfully, but these errors were encountered: