Skip to content
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

CachingSession does not allow using SKIP_METADATA #1178

Open
wprzytula opened this issue Jan 23, 2025 · 0 comments
Open

CachingSession does not allow using SKIP_METADATA #1178

wprzytula opened this issue Jan 23, 2025 · 0 comments
Labels
area/statement-execution performance Improves performance of existing features
Milestone

Comments

@wprzytula
Copy link
Collaborator

Problem statement

As CachingSession manages preparation internally, it does not expose its PreparedStatements in any way. Therefore, it's not possible for a user of CachingSession to call PreparedStatement::set_use_cached_result_metadata in order to take advantage of that optimisation.

There are use cases when not having possibility to turn the optimisation on may result in significant inefficiency. As an example, the experimental NodeJS-over-Rust driver's API suits CachingSession's API best, but lack of the mentioned optimisation makes the experimental driver fall short compared to the original NodeJS driver (which, most likely, has the optimisation turned on).

Possible solution

Expose a way to set up CachingSession so that it turns the optimisation on for all PreparedStatements it manages.
Of course, write a big BEWARE disclaimer mentioning what are the possible pitfalls when using the optimisation (SELECT *, etc.).

@wprzytula wprzytula added performance Improves performance of existing features area/statement-execution labels Jan 23, 2025
@wprzytula wprzytula modified the milestones: 1.1.0, 1.x.0 Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/statement-execution performance Improves performance of existing features
Projects
None yet
Development

No branches or pull requests

1 participant