Re: Suggestion for prefetch_related() documentation

2022-06-25 Thread Laurent Lyaudet
Hello, Thanks for the link :) I think the documentation would be better structured, then, if https://docs.djangoproject.com/fr/4.0/ref/models/querysets/ would reference your link. I have not read all of Django documentation. I do not know if it is expected that most developers would read everythi

Re: Suggestion for prefetch_related() documentation

2022-06-23 Thread Jason
This is explicitly called out in the documentation at https://docs.djangoproject.com/en/4.0/topics/db/optimization/#understand-queryset-evaluation On Thursday, June 23, 2022 at 1:17:50 PM UTC-4 laurent...@gmail.com wrote: > Hello, > > I made a simple test to check the number of queries done : >

Suggestion for prefetch_related() documentation

2022-06-23 Thread Laurent Lyaudet
Hello, I made a simple test to check the number of queries done : # First part order = Order.objects.get(id=2) # one query items = list(order.items.all()) # one query items = list(order.items.all()) # one query items = list(order.items.all()) # one query # Second part order = Order.objec