diff options
| author | Daniel Jilg <winsmith@winsmith.de> | 2016-04-06 13:55:09 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-04-06 11:06:38 -0400 |
| commit | eed658d7c4dda695976c6845346b166960957eba (patch) | |
| tree | 889c7aa044140384918678ac7eef8163bb2486f0 | |
| parent | ab2d34ba3fe95d0324d544ca2ca92c2bf0b533aa (diff) | |
Refs #14131 -- Documented why paginating large QuerySets may be slow.
| -rw-r--r-- | docs/topics/pagination.txt | 8 |
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 |
