I\'m getting thousands of these queries when I try to open up a model in the Django admin interface and it\'s leading to a serious performance issue.
[sql] SELEC
Or just enable list_select_related.
class MyModelAdmin(admin.ModelAdmin):
list_select_related = True
# ....
You could make Django use select_related by defining your own ModelAdmin like this
class MyModelAdmin(admin.ModelAdmin):
def queryset(self, request):
qs = super(MyModelAdmin, self).queryset(request)
return qs.select_related()