Thursday, February 25, 2016

LIMIT 1 on model.objects.get()

When Django creates the SQL to get an object from model.objects.get() it
doesn't look like SQL is adding a "LIMIT 1" to the end. As the get method
is always intended to return a single item, would adding that to Django's
SQL speed things up?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/760019c9-f911-4e67-b129-261b61dbe54f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment