Skip to content

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.

@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.

2 participants