N+1 Nightmare Busters
Today we're diving into two fantastic bug fixes that landed in Django - one preventing sneaky N+1 queries in RelatedManager with only(), and another fixing test crashes when running subset tests. Both PRs showcase the community's dedication to making Django more reliable and performant.
Duration: PT4M6S
Episode overview
This episode is a short developer briefing from Django.
It explains recent repository work in plain language.
- Show: Django
- Published: 2026-01-14T16:47:44Z
- Audio duration: PT4M6S
Source and disclosure
Django is an unofficial, AI-generated summary of public activity in django/django on GitHub.
Podlog isn't affiliated with or endorsed by the project or its maintainers. Episodes aren't reviewed by a person before they go out, so check the source repository for the full story.
Transcript excerpt
This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.
Hey there, Django developers! Welcome back to another episode of the Django podcast. I'm your host, and I'm genuinely excited to share what's been happening in the Django world today, January 14th, 2026.
You know that feeling when you think your code is running smoothly, and then you discover it's been silently making hundreds of database queries behind your back? Well, today we're talking about two brilliant fixes that tackle exactly these kinds of sneaky issues that can drive us all a little crazy.
Let's start with the star of the show - PR 20495 by Samriddha9619. This one's a real performance hero, fixing issue 35442 about N+1 queries in RelatedManager when using the only() method. Now, if you've ever used only() to optimize your queries by selecting just the fields you need, you might have unknowingly walked…
Here's what was happening: when you'd use only() and exclude the foreign key field, Django's ModelIterable would try to be helpful by accessing that foreign key on the child object to populate relationships. But since that key was deferred, every single access triggered a separate SQL query. Imagine iterating over a…
The fix is actually quite elegant. Instead of blindly…
Our…
Nearby episodes from Django
- Automation Wins and SQLite Fixes
- Polish and Performance - When Small Changes Make Big Impacts
- Fresh Code, Fresh Style - Django's 2026 Makeover
- PostgreSQL Limits and Better Error Messages
- Security Patch Wave and Release Reverts
- Async Transactions Land Plus Oracle Ordering Fixes
- Unique Constraint Validation Fixes
- Weekly Recap - Regression Repairs and Admin Edge Cases