views:

56

answers:

1

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

+5  A: 

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.

Evgeny
Just the tool I was looking for! Many thanks!
wailer