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