Skip to content

ignore stmtClose to make sure smtPrepare can hit plan cache #31056

Closed
@dbsid

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions