djangosnippets.org: Latest snippets tagged with 'dataset'https://djangosnippets.org/tags/dataset/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 redistributable