Re: [sqlalchemy] Speed performance

2022-12-07 Thread Mike Bayer
it's not clear what would cause the time delay, seems like a timeout after a deadlock of some kind. however first thing is that your async code is written incorrectly, as it is sharing the same AsyncSession among two concurrent async tasks, which will cause random errors at any number of

[sqlalchemy] Speed performance

2022-12-07 Thread Jaime Valdez
Hi group, I'm having some issues trying to do some queries using the create_async_engine, the following code is the fastest one. import time import asyncio from typing import Any, Dict, List from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy import