﻿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
30842	Prefetch_related spends considerable time constructing querysets.	Alex Aktsipetrov	nobody	"As part of the [https://code.djangoproject.com/ticket/26226 bugfix] django started constructing N+1 querysets during a typical prefetch_related call while only 2 sql queries are executed. 

This adds a noticeable slowdown. Attaching the flamegraph for queryset fetching 100 objects, roughly 2/3 of the time are spent there."	Cleanup/optimization	closed	Database layer (models, ORM)	dev	Normal	duplicate	prefetch_related	Simon Charette	Accepted	1	0	0	0	0	0
