filmov
tv
Examining ORM Queries with Debug SQL Shell in Django Debug Toolbar
Показать описание
In this Django Debug Toolbar follow up video, we explore its "Debug SQL Shell" feature / "debugsqlshell" management command.
It allows developers to execute ORM operations while simultaneously displaying the underlying SQL queries.
We show a couple of examples, including the select_related() of the N+1 video we did (linked below), which reduces the amount of queries by using SQL JOINs.
You'll see the SQL that actually gets executed on the DB, very interesting!
We hope this is useful and that you use this, in addition to the Django Debug Toolbar, to optimize your database queries. Remember, ORMs, although great and convenient, can lead to inefficient SQL queries, so it's critical that you look at the underlying SQL.
Links:
---
And last but not least, we appreciate any feedback to make our YouTube content better 💡
It allows developers to execute ORM operations while simultaneously displaying the underlying SQL queries.
We show a couple of examples, including the select_related() of the N+1 video we did (linked below), which reduces the amount of queries by using SQL JOINs.
You'll see the SQL that actually gets executed on the DB, very interesting!
We hope this is useful and that you use this, in addition to the Django Debug Toolbar, to optimize your database queries. Remember, ORMs, although great and convenient, can lead to inefficient SQL queries, so it's critical that you look at the underlying SQL.
Links:
---
And last but not least, we appreciate any feedback to make our YouTube content better 💡