DRF-extensions queryset use select_related,show different sql result
luckygogreen opened this issue · 0 comments
luckygogreen commented
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