A Django app that tracks your queries to help optimize them

This page summarizes the projects mentioned and recommended in the original post on /r/Python

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Wagtail

    A Django content management system focused on flexibility and user experience

  • Not so long ago, I submitted a Pull Request in wagtail to improve the admin performance, especially for non-superusers. Basically, it caches all the user's permissions on first access. However, I was pretty sure that this would load a lot of model fields that we never need but there isn't a tool that gives us that type of report. Therefore, I started building an app that keeps track of all fields accessed so you can easily know which ones haven't been used and apply the only/defer optimisation for Django querysets.

  • dj-tracker

    A Django app that tracks your queries to help optimize them. Demo: https://dj-tracker-bakerydemo.herokuapp.com/dj-tracker/

  • That was the little story for dj-tracker and here is what it can do in summary: - Keep track of all fields accessed (allowing to use only or defer when some fields aren't used - Keep track of all attributes accessed (it can then give you a hint to use .values or .values_list) - Show how effective a queryset's cache is (and provide hints on using the .iterator optimisation) - Show all related queries in the same section and where they come from (making it super easy to detect N+1 queries) - Detailed traceback, SQL and template information for each query - Everything is persisted in a database so you can see how your application performs over time

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts