diff options
| author | e0ne <e0ne@e0ne.info> | 2013-09-08 22:57:36 +0300 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-09-09 09:47:18 -0400 |
| commit | cbf08c6b0ca39406cada4bd1ffc6d334a79822e8 (patch) | |
| tree | 3dc20ded864ea96efc0a934d70eb27ebed02a2e7 /docs/ref | |
| parent | 1185370c2c7e66428c45c69e960d10198e17e367 (diff) | |
Fixed #16895 -- Warned about cost of QuerySet ordering
Thanks outofculture at gmail.com for the suggestion.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/options.txt | 6 | ||||
| -rw-r--r-- | docs/ref/models/querysets.txt | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt index ee7d9d7116..1caeadddf9 100644 --- a/docs/ref/models/options.txt +++ b/docs/ref/models/options.txt @@ -221,6 +221,12 @@ Django quotes column and table names behind the scenes. ordering = ['-pub_date', 'author'] +.. warning:: + + Ordering is not a free operation. Each field you add to the ordering + incurs a cost to your database. Each foreign key you add will + impliclty include all of its default orderings as well. + ``permissions`` --------------- diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index c99d27769f..000415f028 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -334,6 +334,12 @@ You can tell if a query is ordered or not by checking the :attr:`.QuerySet.ordered` attribute, which will be ``True`` if the ``QuerySet`` has been ordered in any way. +.. warning:: + + Ordering is not a free operation. Each field you add to the ordering + incurs a cost to your database. Each foreign key you add will + impliclty include all of its default orderings as well. + reverse ~~~~~~~ |
