# How does Django handles async ORM queries?

**URL:** <https://forum.djangoproject.com/t/how-does-django-handles-async-orm-queries/42839>\
**Category:** Async\
**Created:** [September 13, 2025, 10:10am UTC](https://forum.djangoproject.com/t/how-does-django-handles-async-orm-queries/42839 "2025-09-13T10:10:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![laggron42](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/laggron42/32/29877_2.png) [@laggron42](https://forum.djangoproject.com/u/laggron42)\
**Post date:** [September 13, 2025, 10:10am UTC](https://forum.djangoproject.com/t/how-does-django-handles-async-orm-queries/42839/1 "2025-09-13T10:10:12Z")

</div>

Hello there! I’m very new to Django’s internals, and something’s been troubling me with asynchronous support.

For context, I’m using Django along a `discord.py` bot, meaning the context is _always_ asynchronous, all my queries have to be done async.  
Recently I’ve been trying to access the internal psycopg connection object to access the `.copy` method, but I noticed the connection returned is synchronous, where [`AsyncConnection`](https://www.psycopg.org/psycopg3/docs/advanced/async.html#asynchronous-operations) exists for asynchronous queries. After further searching, I also noticed most of the asynchronous ORM methods are just the synchronous methods wrapped in `sync_to_async`.

So here’s my question, _how does Django manage async?_  
If the database backends calls are synchronous, how does Django actually achieve asynchronicity? I’ve ran some tests myself before, and long running queries do not block the asyncio event loop, so something must be happening for it to work, but I cannot understand where and how the magic happens.

---

<div class="post-metadata">

**Author:** ![laggron42](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/laggron42/32/29877_2.png) [@laggron42](https://forum.djangoproject.com/u/laggron42)\
**Post date:** [September 13, 2025, 10:30am UTC](https://forum.djangoproject.com/t/how-does-django-handles-async-orm-queries/42839/2 "2025-09-13T10:30:46Z")

</div>

I got my answers in the following threads and documents

- [deps/accepted/0009-async.rst at main · django/deps · GitHub](https://github.com/django/deps/blob/main/accepted/0009-async.rst)
- Parallelism across the same django DB connection? (I’m not allowed to post more than 2 links…)
- Are concurrent database queries in ASGI a thing?

So it’s basically not async, calls are made in new threads, but all the queries will join back to the same connection thread regardless, one after another.

Someone already made a PR to use the asynchronous driver of psycopg3 here: [Support async database backends by domingues · Pull Request #17275 · django/django · GitHub](https://github.com/django/django/pull/17275) , but no maintainer replied yet. Is there even a ticket for that in Django’s tracking?

---

<div class="post-metadata">

**Author:** ![Arfey](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/arfey/32/32504_2.png) [@Arfey](https://forum.djangoproject.com/u/Arfey)\
**Post date:** [January 16, 2026, 11:57am UTC](https://forum.djangoproject.com/t/how-does-django-handles-async-orm-queries/42839/3 "2026-01-16T11:57:12Z")

</div>

> Is there even a ticket for that in Django’s tracking?

> <https://github.com/django/new-features/issues/7>
>
> \### Code of Conduct
> 
> \- \[x\] I agree to follow Django's Code of Conduct
> 
> \### Featu…re Description
> 
> Make Django's ORM fully support async operations, so we can \`await\` database queries directly without needing workarounds like \`sync\_to\_async( )\`.
> 
> 
> \### Problem
> 
> Right now, even though Django supports ASGI and async views, the ORM is still synchronous. This means when we hit the database inside an async view, it blocks a thread, and we lose the performance benefits of running an async server. We have to use extra things like \`sync\_to\_async()\`, which makes the code messier and not truly async. If the ORM could be used with \`await\`, Django apps could handle a lot more traffic, work better with real-time apps, and feel more modern overall.
> 
> 
> \### Request or proposal
> 
> request
> 
> \### Additional Details
> 
> Adding full async ORM support would make Django even better for modern applications like real-time dashboards, high-frequency APIs, and IoT data platforms.
> 
> For example, in my own projects (like a Smart Community Data Platform handling IoT data), using a fully async ORM would help scale better and reduce latency by avoiding blocking calls in async views. Today, because Django's ORM is still synchronous, I sometimes choose other frameworks like FastAPI with Tortoise ORM when I need full async performance end-to-end.
> 
> However, I still prefer Django for many parts of my systems, especially for building admin panels, billing services, and reliable backend management features where Django’s strengths shine. I believe that with native async ORM support, Django could stay the first choice for both traditional and high-concurrency projects.
> 
> Thanks for considering this! I'm very excited about Django’s future with more async capabilities.
> 
> 
> 
> \### Implementation Suggestions
> 
> These suggestions are inspired by patterns I've seen working well in other fully async Python frameworks like Tortoise ORM and SQLModel:
> 
> \- Add async methods like aget(), acreate(), asave() to Django’s ORM, so developers can await database operations directly.
> \- Use async database drivers like asyncpg for Postgres connections under the hood.
> \- Allow QuerySets to be evaluated inside async contexts without blocking.
> \- Improve transaction management (like atomic blocks) to be async-friendly and safe in event loops.
> \- Maybe introduce this feature behind a settings flag first, like settings.USE\_ASYNC\_ORM = True, so people can opt in during early phases.
> 
> This way, async ORM support could be rolled out gradually in Django without breaking existing synchronous projects.
