chibisov / drf-extensions

DRF-extensions is a collection of custom extensions for Django REST Framework
http://chibisov.github.io/drf-extensions/docs
MIT License
1.48k stars 208 forks source link

DRF-extensions queryset use select_related,show different sql result #301

Closed luckygogreen closed 2 years ago

luckygogreen commented 4 years ago

I try to use DRF-extensions for the caches. but same queryset ,Will produce different sql query time, my code:

... class ....: queryset = Users.objects.select_related('location', 'status', 'department', 'position', 'payper') ...

no DRF-extensions

def list(self, request, *args, **kwargs): https://i.stack.imgur.com/EnTWZ.png

DRF-extensions

@cache_response(timeout=60 60, key_func=StaffListKeyConstructor()) def list(self, request, args, **kwargs): https://i.stack.imgur.com/3km9Y.png

is this a bug ? @akx @thedrow @vshih @nofeet @fladi