[Django]-Django SELECT COUNT(*) as "__count" for every query

3👍

This occurs in Django Rest Framework when you are using paging on a list view:

  • One query to fetch the data for your current page.
  • A second query to calculate the total number of records for the same queryset.

Leave a comment