﻿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
2189	[patch] Auth runs unnecessary SQL to get permissions	konrad@…	Adrian Holovaty	"On each request, when the permissions are requested for a user this SQL gets executed a bunch of times, for each permission the user has:
{{{
SELECT `django_content_type`.`id`, `django_content_type`.`name`, `django_content_type`.`app_label`, `django_content_type`.`model` 
FROM `django_content_type` WHERE (`django_content_type`.`id` = %s)
}}}
Could all this be done in one statement using selected_related() instead of all()? Might be worth optimizing since it's per-request. "	enhancement	closed	Contrib apps		minor	fixed			Unreviewed	1	0	0	0	0	0
