Skip to content

Prepared statements caching in proxy #37274

@TedCraft

Description

@TedCraft

Feature Request

For English only, other languages will not be accepted.

Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot make decision by current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Is your feature request related to a problem?

In MySQL and PostgreSQL, reused prepared statements are managed efficiently through the internal JDBC driver cache. However, the Firebird JDBC driver lacks this caching capability. As a result, when a user executes a prepared statement multiple times, ShardingSphere repeatedly performs the costly 'prepare' operation, rather than executing it just once using a cached statement.

Describe the feature you would like.

I propose adding a caching mechanism for prepared statements in the proxy, similar to how it is implemented in the JDBC driver. I currently have the necessary changes in my fork, but before creating a pull request, I would like to hear the community's opinion on this feature. My implementation modifies some of the core proxy code (though it does not affect the execution logic for MySQL and PostgreSQL) and might not be strictly necessary for databases that already have client-side caching in their drivers. However, in the future, this may be useful for databases without this built-in feature.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions