Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

Which is the most reliable way to detect N+1 queries during development?

  1. A Reading the code carefully
  2. B Using django-debug-toolbar to inspect the query count per page
  3. C Checking the server logs
  4. D Increasing the database timeout
Answer

Using django-debug-toolbar to inspect the query count per page

The toolbar shows every query and its origin. Adding assertNumQueries to a test then prevents the problem from returning.

All Django MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as