Changes between Initial Version and Version 1 of Ticket #25787, comment 3


Ignore:
Timestamp:
Nov 21, 2015, 9:06:30 AM (9 years ago)
Author:
Justus Adam

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25787, comment 3

    initial v1  
    11If that executes lazily then I am ok with this, thank you.
     2
     3However looking at the code for QuerySet it defines an {{{__iter__}}} method but no {{{__contains__}}} method and {{{__iter__}}} executes {{{_fetch_all}}}, which means instead of doing an {{{.exists()}}} query using {{{in}}} on a query set fetches a large number of objects and iterates over the result. This is very inefficient.
Back to Top