I am a Django newbie and also interested in this question.
From reading the Django book
http://www.djangobook.com/en/2.0/chapter05/,
I see that the query 'Publisher.objects.order_by('name')[0:2]' maps
to:
SELECT id, name, address, city, state_province, country, website
FROM books_publisher
ORDER BY name
OFFSET 0 LIMIT 2;
Also, Django delays execution of the db query until the result is
actually required.
Given the above two observations, I would think that both the type of
accesses you mentioned will do exactly the same thing, which is to do
a query with "OFFSET 0 LIMIT 1".
To confirm this, you can use the django-devserver (
https://github.com/
dcramer/django-devserver) with SQL queries enabled which will display
every query made in real time.
thanks,
-pavan