django-infinite-scroll-pagination
django-infinite-scroll-pagination copied to clipboard
Fast row values pagination
Fixes #9 Related #8
Implements the "row values" variation.
Benchmark without index, 1M rows; 4 sort fields; page 80K; article 800K:
Offset/Limit 1.692431215000397
Seek Method 0.3435570509991521
Benchmark with index, 1M rows; 4 sort fields; page 80K; article 800K:
Offset/Limit 0.10353935199964326
Seek Method 0.0020750300009240163
This cannot be merged as is. The "row variation" doesn't support mixing the sort direction, all fields must be either ASC or DESC. This implementation does not support relationships (ex: foo__bar
) on the filter/sort fields. It seems to work on sqlite and postgresql, but it won't work on Oracle, and idk about mysql. It may not work with every field; I've tested it with BooleanField, DatetimeField, and IntegerField.
I think there should be a parameter that enables this, like fast_mode=True
or something.