On Sat, Jun 30, 2018 at 12:40 PM Tom Forbes <t...@tomforb.es> wrote:

> Are you sure it is the prefetches that is causing this? As Adam pointed
> out these are correctly ignored. Annotations however are not, which can
> cause unnecessary work and longer execution times. i.e:
>
> Book.objects.annotate(something=Max('pages__word_count')).count()
>
> We have enough information to be able to strip the pages join when using
> count() it certain conditions are met, and this might be preferable than
> adding workarounds to various places.
>

FYI: This had already been reported in #23771 (
https://code.djangoproject.com/ticket/23771) (and a couple of
similar/duplicates tickets)

Regards,

-- 
Ramiro Morales
@ramiromorales

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAO7PdF_Y_vQqYNst5ZR1d9vxWaZMqhZwfF3fcZ4PC7tQv0hGJw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to