[CentralOH] Django Management Command Memory Usage: Places.objects.all().iterator() Seems to be Solution

jep200404 at columbus.rr.com jep200404 at columbus.rr.com
Mon Jun 4 21:34:56 CEST 2012


On Mon, 4 Jun 2012 07:59:12 -0700, Austin Godber <godber at gmail.com> wrote:

> #3 here:
> http://blog.davidziegler.net/post/548363214/some-common-django-orm-pitfalls

Thanks Austin. 

Places.objects.all().iterator() seems to have solved my problem. 
With the initial query, the memory use jumps up 3.5 GB, 
but does not increase further as the loop runs. 

It also seems faster, although I've not measured that. 



More information about the CentralOH mailing list