There are all kinds of libraries to gain insight on queries (which, how many, how performant) inside your Django application, the most popular being django-silk and the django-debug-toolbar.
Those tools above however may be a bit overkill for some use cases, which is why I would like to mention some slim alternatives that produce console output only:
- shell_plus –print-sql: To simply print all SQL queries as they are executed
- django-debug-query: This will print out formatted and colored SQL statements into the console. Good to get a detailled look into the actual queries being done. Not so good for views that produce lots of queries, as it prints all of them. Great for playing around with the ORM in a shell and see what the query looks like.