It looks like the SqlAlchemy uses their own native async engine.
engine = sa_asyncio.create_async_engine(
f"postgresql+asyncpg://sqlalch_bench:edgedbbenchmark@"
f"{ctx.db_host}:{ctx.pg_port}/sqlalch_bench"
)
If you subbed in your (ie MagicStack's) AsyncPG library instead instead (should be a couple line change), I'd be very curious to see a comparison... that would be a revealing benchmark to see how your EdgeDB Query Optimizer is doing (vs how much of the performance difference is better serialization).
It looks like the SqlAlchemy uses their own native async engine.
If you subbed in your (ie MagicStack's) AsyncPG library instead instead (should be a couple line change), I'd be very curious to see a comparison... that would be a revealing benchmark to see how your EdgeDB Query Optimizer is doing (vs how much of the performance difference is better serialization).