Hi!
I am trying to benchmark query times, and I can't seem to get
connection.queries to have anything except when I run
cursor().execute() myself. Here is an example to better illustrate my
question:
>>> DEBUG=True
>>> from myapp.models.references import Stuff
>>> from django.db import connection
>>> p = Stuff.objects.all()
>>> print connection.queries
[]
>>> connection.cursor().execute("SELECT * FROM stuff")
12L
>>> print connection.queries
[{'time': '0.001', 'sql': 'SELECT * FROM stuff'}]
What I would like is for there to be SQL information regarding what
happened during "Stuff.objects.all()". Instead, I get an empty
connection.queries array. How can I see queries run during internal
django sql executes?
Thanks for your help!
Eric
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---