Skip to content

SQL compilation caching #16

@erik-abrahamsson

Description

@erik-abrahamsson

Hi, I get this warning message. I'm not sure if this would be an easy fix or not but it would be nice to have this caching enabled.
I also don't understand how to set the attribute to False like suggested to get rid of the warning.

c:\dev\LEproj\backend\.venv\lib\site-packages\sqlalchemy_sqlany\base.py:464: SAWarning: Dialect sqlany:<module 'sqlanydb' from 'c:\\dev\\LEproj\\backend\\.venv\\lib\\site-packages\\sqlanydb.py'> 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. (Background on this error at: https://sqlalche.me/e/14/cprf)

This might be helpful: https://docs.sqlalchemy.org/en/14/core/internals.html#sqlalchemy.engine.Dialect.supports_statement_cache

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions