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

Add support for statements cache #10

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

adamchen
Copy link
Collaborator

@adamchen adamchen commented Mar 1, 2022

Using sqlalchemy-turbodbc with SQL Alchemy 1.4.x will yield the below warning:

sqlalchemy.exc.SAWarning: Dialect mssql:turbodbc will not make use of SQL
compilation caching as it does not set the 'supports_statement_cache'
attribute to True. This can have significant performance implications
including some performance degradations in comparison to prior SQLAlchemy
versions. Dialect maintainers should seek to set this attribute to True
after appropriate development and testing for SQLAlchemy 1.4 caching
support. Alternatively, this attribute may be set to False which will
disable this warning.

I've had a look over this link and based on that and a review of the code I don't see any reason given that MSDialect_turbodbc extends MSDialect (and there's not too much heavy lifting going on in it) that it can't also be enabled there.

I did some basic testing of some use cases (ORM queries, some auto-mapping) and saw both that the warning message went away and there weren't any other errors that were created as a result of this change.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…also
@dirkjonker
Copy link
Owner

Thank you @adamchen this looks good, I'll try to release a new minor version this week

@dirkjonker dirkjonker merged commit 1654764 into dirkjonker:master Mar 7, 2022
@adamchen
Copy link
Collaborator Author

adamchen commented Mar 8, 2022

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants