On each page, the query stats will display how many database queries were performed and how long they took.
Clicking the stats in the toolbar will show the full SQL query log with tracebacks and timings. This is even designed to work in production, making it much easier to discover and debug performance issues on production data!
It will also point out duplicate queries,
which can typically be removed by using
prefetch_related, or otherwise refactoring your code.
# settings.py INSTALLED_APPS += [ "forgepro.querystats", ] MIDDLEWARE = MIDDLEWARE + [ "forgepro.querystats.QueryStatsMiddleware", # Put QueryStats above additional middleware # ... ]