Re: Counting queries and query execution time

2009-03-31 Thread Malcolm Tredinnick
On Tue, 2009-03-31 at 06:29 -0700, Ceph wrote: > Under settings.DEBUG=True, django.db.connection.queries is an array of > all queries executed. For a single request. > Obviously storing every query in text is a > memory hog. Not obvious at all. Storing a few strings doesn't use a lot of

Re: Counting queries and query execution time

2009-03-31 Thread Thomas Guettler
Hi, I have written an SQLLogMiddleware: http://www.djangosnippets.org/snippets/344/ Maybe this helps you. But it only works if settings.DEBUG is true. Ceph schrieb: > Under settings.DEBUG=True, django.db.connection.queries is an array of > all queries executed. Obviously storing every query

Counting queries and query execution time

2009-03-31 Thread Ceph
Under settings.DEBUG=True, django.db.connection.queries is an array of all queries executed. Obviously storing every query in text is a memory hog. Would it still thrash as much if I wrote my own wrapper around a DB connection class via settings.DATABASE_ENGINE that implemented its own