build1 publisher
A .filter() inside the loop turns prefetch_related into a query per order
Ten orders with a filtered accessor measured twelve queries with the eager load against eleven without it, and the same fixture behaves identically on Django 4.2 and 6.1, so there is no version boundary to wait out.
Publishers:dev.to
Reality
- Evidence60
- Adoption40
- Hype gap−15
- Incentives25
- Confidence58