8

Is there a way to find out how many SQL queries made by django app. when I try to load a page? What I like to do as I browse from page to page.. is to record the following in a text file... or see it in stdout.

  1. page url
  2. total queries
  3. total query execution time

is there such tool/script?

Cheers

wailer
  • 511
  • 7
  • 22

1 Answers1

4

Use debug_toolbar app, it prints not only number of queries, but each one of them and how long they took to run + a lot more useful info.

One thing to remember - this app makes django use quite a bit more memory, so it's best used only in the test environment.

Here is a related question with good answers.

Community
  • 1
  • 1
Evgeny
  • 10,698
  • 9
  • 60
  • 70