Does the order select_related is put in a queryset chain matter?
i.e. is there any difference between:
SomeModel.objects.select_related().all()
and
SomeModel.objects.all().select_related()
In my brief testing they both seem to cache objects but I’m wondering if there are any performance differences or anything else I’m not realizing is different?
They both execute the same exact query. So no, there would be no performance differences.
To test, try this:
You should get the same exact query