-
Notifications
You must be signed in to change notification settings - Fork 403
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
Delay on first access to enum columns using prepared statements #727
Comments
As a brief update, I just tried running the example application against PostgreSQL 11.11 and am not seeing the delay in that case. |
Try disabling JIT in PostgreSQL ( |
That seems to do the trick, thanks for the quick reply. |
The issue is closed, but seems like the error in driver? |
sqlalchemy-bot
pushed a commit
to sqlalchemy/sqlalchemy
that referenced
this issue
Feb 10, 2022
* clarify merge behavior for non-present attributes, references #7687 * fix AsyncSession in async_scoped_session documentation, name the scoped session AsyncScopedSession, fixes: #7671 * Use non-deprecated execute() style in sqltypes JSON examples, fixes: #7633 * Add note regarding mitigation for MagicStack/asyncpg#727, fixes #7245 Fixes: #7671 Fixes: #7633 Fixes: #7245 Change-Id: Ic40b4378ca321367a912864f4eddfdd9714fe217
sqlalchemy-bot
pushed a commit
to sqlalchemy/sqlalchemy
that referenced
this issue
Feb 10, 2022
* clarify merge behavior for non-present attributes, references #7687 * fix AsyncSession in async_scoped_session documentation, name the scoped session AsyncScopedSession, fixes: #7671 * Use non-deprecated execute() style in sqltypes JSON examples, fixes: #7633 * Add note regarding mitigation for MagicStack/asyncpg#727, fixes #7245 Fixes: #7671 Fixes: #7633 Fixes: #7245 Change-Id: Ic40b4378ca321367a912864f4eddfdd9714fe217 (cherry picked from commit 449389a)
relsunkaev
pushed a commit
to relsunkaev/sqlalchemy
that referenced
this issue
Feb 15, 2022
* clarify merge behavior for non-present attributes, references sqlalchemy#7687 * fix AsyncSession in async_scoped_session documentation, name the scoped session AsyncScopedSession, fixes: sqlalchemy#7671 * Use non-deprecated execute() style in sqltypes JSON examples, fixes: sqlalchemy#7633 * Add note regarding mitigation for MagicStack/asyncpg#727, fixes sqlalchemy#7245 Fixes: sqlalchemy#7671 Fixes: sqlalchemy#7633 Fixes: sqlalchemy#7245 Change-Id: Ic40b4378ca321367a912864f4eddfdd9714fe217
elprans
added a commit
that referenced
this issue
Sep 23, 2023
elprans
added a commit
that referenced
this issue
Oct 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the issue with a local PostgreSQL install?: No SaaS, reproducible using local PostgreSQL.
I am observing a delay when accessing a table with enum columns using prepared statements. My code uses SQLAlchemy's ORM in combination with asyncpg, but I've received help in narrowing it down to an issue with asyncpg's prepared statements (see the SQLAlchemy mailing list for more info).
Example application to reproduce the issue:
Logging output of the 3 insert operations shows:
Note:
I've seen this same delay in several configurations:
The main question to start off with: is this expected behaviour?
I can imagine use of enums might require some cache initialisation for improved performance on subsequent operations, but it seems the delay increases significantly going from 1 to 2 enum columns.
The text was updated successfully, but these errors were encountered: