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

SAWarning: Class AnnotatedColumn will not make use of SQL compilation #110

Open
edupo opened this issue Feb 24, 2022 · 1 comment
Open

Comments

@edupo
Copy link

edupo commented Feb 24, 2022

Problem:
I'm experiencing some warnings when I do use sqlathanor.declarative_base:

SAWarning: Class AnnotatedColumn will not make use of SQL compilation caching as it does not set the 'inherit_cache'
attribute to ``True``.  This can have significant performance implications including some performance degradations in 
comparison to prior SQLAlchemy versions.  Set this attribute to True if this object can make use of the cache key generated 
by the superclass. Alternatively, this attribute may be set to False which will disable this warning. 
(Background on this error at: https://sqlalche.me/e/14/cprf)

My environment is:

SQLAlchemy==1.4.31
sqlathanor==0.7.0

Does anyone experience the same warnings? I can't sleep knowing that this can have significant performance implications....

@edupo
Copy link
Author

edupo commented Feb 24, 2022

sqlalchemy/sqlalchemy#7766 I've forwarded this issue to SQLAlchemy and the answer is clear. The subclass must override inherit_cache so the attached PR still holds valid I believe.

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

No branches or pull requests

1 participant