summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jilg <winsmith@winsmith.de>2016-04-06 13:55:09 +0200
committerTim Graham <timograham@gmail.com>2016-04-06 11:08:03 -0400
commite043b85b1518c38f1d5fe5671ab0f4eccc569ce8 (patch)
tree0978d479ae7d6b86c17c205774d0f3f0f1e9fb36
parent147f9a0d2a31a90df413158ecaa7778a1f21e281 (diff)
[1.9.x] Refs #14131 -- Documented why paginating large QuerySets may be slow.
Backport of eed658d7c4dda695976c6845346b166960957eba from master
-rw-r--r--docs/topics/pagination.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/topics/pagination.txt b/docs/topics/pagination.txt
index 9baa1879e1..85612b734e 100644
--- a/docs/topics/pagination.txt
+++ b/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