Skip to content
All lessons

Tech Insights

Django prefetch_related makes an extra query to pre-fill the related objects. If you use prefetch_related 3 times in the ...

Django prefetch_related makes an extra query to pre-fill the related objects. If you use prefetch_related 3 times in the same queryset Django ORM will hit the database 4 times to fetch all the results.

Shared by

Book a call

Lessons like this one
shape how we build.

Tell us what you’re building. In one call, we’ll show you how our team would approach it.

Tell us what you’re building, and we’ll show you how we’d approach it.

Still prefer the good old email? Contact us