Browse Source

Refs #14131 -- Documented why paginating large QuerySets may be slow.

Daniel Jilg 9 years ago
parent
commit
eed658d7c4
1 changed files with 5 additions and 3 deletions
  1. 5 3
      docs/topics/pagination.txt

+ 5 - 3
docs/topics/pagination.txt

@@ -146,10 +146,12 @@ Required arguments
     clause or with a default :attr:`~django.db.models.Options.ordering` on the
     model.
 
-    .. note::
+    .. admonition:: Performance issues paginating large ``QuerySet``\s
 
-        If you are using a ``QuerySet`` with a very large number of items,
-        requesting high page numbers might be slow on some database backends.
+        If you're using a ``QuerySet`` with a very large number of items,
+        requesting high page numbers might be slow on some databases, because
+        the resulting ``LIMIT``/``OFFSET`` query needs to count the number of
+        ``OFFSET`` records which takes longer as the page number gets higher.
 
 ``per_page``
     The maximum number of items to include on a page, not including orphans