Is there any tool, plugin or technique that I can use to help identify n+1 queries on a Django application? There is a gem called bullet for Rails that identifies n+1 queries and logs or pops up warnings in a number of ways but I haven't been able to find anything similar for Django. I'd be open to guidance on how to write my own plugin if no one knows of an existing solution.
nplusone does this
Auto-detecting the n+1 queries problem in Python
https://github.com/jmcarp/nplusone
comes with proper django support! also integrates with flask, vanilla wsgi, ...
I don't know any plugin that would find them automatically and warn you.
I personally use the Django Debug Toolbar: https://github.com/django-debug-toolbar/django-debug-toolbar
It shows the number of queries ran on a page and you can view them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With