djangosnippets.org: Latest snippets tagged with 'large'https://djangosnippets.org/tags/large/2010-11-28T22:50:12.501320-06:00Faster pagination / model object seeking (10x faster infact :o) for larger datasets (500k +)
2010-11-28T22:50:12.501320-06:00sleepycalhttps://djangosnippets.org/snippets/2277/<pre><code>ModelPagination
Designed and Coded by Cal Leeming
Many thanks to Harry Roberts for giving us a heads up on how to do this properly!
----------------------------------------------------------------------------
This is a super optimized way of paginating datasets over 1 million records.
It uses MAX() rather then COUNT(), because this is super faster.
EXAMPLE: …</code></pre>
Freely redistributablestreaming serializer
2009-03-29T20:55:02.602772-05:00kcarnoldhttps://djangosnippets.org/snippets/1401/<p>Trying <code>./manage.py dumpdata</code> on a huge database and getting <code>MemoryError</code>s? Here's part of your solution.
</p>
<p><a href="http://www.djangosnippets.org/snippets/1400/">Snippet 1400</a> provides a queryset_foreach utility that we've found very useful. This snippet uses it on a serializer that can output to a stream, such as the XML serializer.
</p>
<p>Management command coming momentarily...
</p>
Freely redistributable