Answer the question
In order to leave comments, you need to log in
When are QuerySet queries executed?
Please explain this short topic:
When QuerySet queries are executed
We can add as many filters as we want to the query object, but the actual
execution of the SQL query will occur when the
QuerySet is evaluated. QuerySet is only executed in these cases:
- first iteration over the QuerySet collection;
- when serializing or caching;
- when calling the repr() or len() methods;
- when we explicitly call the list() function, passing it as the QuerySet argument;
- when using QuerySet in boolean expressions like bool(),
or, and, if.
Answer the question
In order to leave comments, you need to log in
this is for you
SQL queriessurprisingly, not in the know, but, just in case, this is a regular SQL query
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question