﻿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
26530	Batch operations on large querysets	Marc Tamlyn	nobody	"It's a pretty common requirement to need to perform an operation on all elements of a large queryset - especially in data migrations where you may not be able to express the updates needed purely as an `update` call or similar.

It would be very handy to have a batching operation, something like `Queryset.batch(lambda obj: obj.do_something(), batch_size=100)`. This would page through the queryset in memory, performing the lambda on every object. Naming is obviously up for discussion. I must have code to do something like this dozens of times.

This is quite similar to how a Paginator works, but the API for pagination feels a bit funny for doing this and it's not much less code than writing it yourself."	New feature	new	Database layer (models, ORM)	dev	Normal				Accepted	0	0	0	0	0	0
