1
0
mirror of https://github.com/django/django.git synced 2025-03-03 13:34:26 +00:00

Fixed #33046 -- Added note about using length of cached result by QuerySet.count().

This commit is contained in:
Can Sarıgöl 2021-08-25 13:44:08 +02:00 committed by Mariusz Felisiak
parent 55cf9e93b5
commit 7ea86076fc

View File

@ -2291,6 +2291,9 @@ retrieving model instances from it (for example, by iterating over it), it's
probably more efficient to use ``len(queryset)`` which won't cause an extra
database query like ``count()`` would.
If the queryset has already been fully retrieved, ``count()`` will use that
length rather than perform an extra database query.
``in_bulk()``
~~~~~~~~~~~~~