Optimize Your Database Operations with Asynchronous Processing
summary
Live demo copies rows between two tables using coroutines and the event loop and shows SQLAlchemy 1.4 with PsycoPG/AsyncPG cutting insert time (example: ~14k rows 0.6s async vs 2.5s sync), plus a cited 1M rows/sec asyncpg benchmark. Code runs correctly and speedups come from overlapping DB I/O, not magic CPU gains. Emphasis on pre-optimizing queries, library compatibility limits, measurable tradeoffs in complexity and maintenance.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:44Database operations overview
- 3:51Synchronous vs asynchronous
- 7:28Why optimize with async
- 8:56Async Python basics
- 12:43Async in database ops
- 14:49Live demo setup
- 20:04Async vs sync results
- 24:37Key takeaways
- 27:29Q&A session
related talks
34mA practical guide to speed up your application with Asyncio
45mFrom Synchronous to Asynchronous Postgres with Tornado
43mOptimize Python & Django apps with Postgres superpowers
25mTaking Django's ORM Async
32mAsynchronous Django: Unlocking the Power of Async Programming
46mPostgreSQL Beyond Django: Strategies to Get Max Performance with Álvaro Justen
01h 58mNo More Raw SQL: SQLAlchemy, ORMs & asyncio
26mSync or async? Feel the magic of coroutines and the event loop in Django
