Skip to content

Update documentation to warn about cost of ordering #1603

Closed
wants to merge 2 commits into from

3 participants

@e0ne
e0ne commented Sep 8, 2013
@akaariai akaariai commented on the diff Sep 9, 2013
docs/topics/db/optimization.txt
@@ -338,3 +338,8 @@ This also applies to :class:`ManyToManyFields
my_band.members.add(my_friend)
...where ``Bands`` and ``Artists`` have a many-to-many relationship.
+
+Don't order if you don't care
+-------------------------------
+
+Ordering is not free; each field added is an operation the database has to perform.
@akaariai
Django member
akaariai added a note Sep 9, 2013

A mention about database indexes speeding up ordering could be good here.

@e0ne
e0ne added a note Sep 9, 2013

Agree, Should I add it to this pull request or create new one?

@akaariai
Django member
akaariai added a note Sep 9, 2013

Add it to this PR directly.

@e0ne
e0ne added a note Sep 9, 2013

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@timgraham
Django member

merged in cbf08c6 - thanks!

@timgraham timgraham closed this Sep 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.