Skip to content

Conversation

nitely
Copy link
Owner

@nitely nitely commented Oct 9, 2020

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

@nitely
Copy link
Owner Author

nitely commented Oct 10, 2020

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.

@nitely nitely changed the title Fast row values paginator Fast row values pagination Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement fast "row values" variant
1 participant