Matt Segal Dev

How to diagnose and fix slow queries with Django Debug Toolbar

Sat 09 May 2020, by Matthew Segal
Category: Django

Your Django views are running slowly and you want to make them faster, but you can't figure out what the issue is just by reading the code. Just as bad is when you're not sure if you're using the Django ORM correctly - how can you know if the code you write will be slow?

This is where a profiling tool comes in handy. Django Debug Toolbar is great for figuring out why your Django views are going slow. This guide will show you how to use DJDT to find and fix slow database queries in your views.

The demo app shown in the video is available on GitHub.

The DJDT docs explain how to install the toolbar.

If you have any feedback or questions email me at [email protected]