﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
12763	Record matching ORM statement in connection.queries for debugging	Daniel Marohn	nobody	As described in the [http://docs.djangoproject.com/en/1.1/faq/models/#faq-see-raw-sql-queries documentation], when DEBUG is true every query that is executed is recorded in django.db.connection.queries. Currently, the raw SQL and the execution time are recorded. It would be useful if the ORM invocation that triggered the execution of the query were also recorded. This would be particularly helpful with views that trigger a large number of query, especially when you have many similar or identical queries and you are trying to find the best places to use select_related or other optimizations.		closed	Database layer (models, ORM)	dev		duplicate	orm debug sql		Unreviewed	1	0	0	0	0	0
