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

sqlalchemy 1.4.31 'supports_statement_cache' warning #106

Closed
imavo opened this issue Feb 14, 2022 · 3 comments
Closed

sqlalchemy 1.4.31 'supports_statement_cache' warning #106

imavo opened this issue Feb 14, 2022 · 3 comments

Comments

@imavo
Copy link

imavo commented Feb 14, 2022

Using sqlalchemy 1.4.31
with python 3.9 , or python 3.10, both on linux x64, and on microsoft-windows-10.
with ibm_db 3.1.1 and ibm_db_sa 0.3.7
with jupyter-notebook (classic interface) and ipython-sql 0.4.0.

The first query run against a Db2 database in any session throws a warning (see below), after which the warning will not re-appear, until a new session of jupyter-notebook gets started. The warning does not impact the result-set which appears as normal.

The text of the warning from sqlalchemy is:

/home/userxxxx/venv1/lib/python3.9/site-packages/sql/run.py:367:

SAWarning: Dialect ibm_db_sa:ibm_db_sa 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)

To see the warning, use at least the above versions of components mentioned:

open a blank jupyter-notebook
%load_ext sql
%env DATABASE_URL=...(to match your database)
%sql select * from someschema.sometable

@amukherjee28
Copy link
Member

@imavo I do see this error as well. Working on this to get it fixed in the new release.

amukherjee28 added a commit to amukherjee28/python-ibmdbsa that referenced this issue Apr 11, 2022
amukherjee28 added a commit to amukherjee28/python-ibmdbsa that referenced this issue Apr 27, 2022
Signed-off-by: amukherjee <[email protected]>
amukherjee28 added a commit that referenced this issue Apr 27, 2022
* code fix for issue #106

Signed-off-by: amukherjee <[email protected]>

* Code changes for issue #24

Signed-off-by: amukherjee <[email protected]>

* PR changes #74

Signed-off-by: amukherjee <[email protected]>

* Fix for issue #20 and PR #56

Signed-off-by: amukherjee <[email protected]>
@frbelotto
Copy link

This message still appears.

@cdracars
Copy link

Also still seeing this?

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

4 participants