Guesstimate partition boundaries from extrema rather than using expensive offsets
Using order by and offset makes the partitioning a n^2 operation on the number of entries in the table, rather than an instant operation when using min/max.
This assumes the indexable column is more or less uniform, which is not exactly true but not the worst approximation either.
Test Plan
tox
Migrated from D1267 (view on Phabricator)
Merge request reports
Activity
Build is green See https://jenkins.softwareheritage.org/job/DLS/job/tox/64/ for more details.
! In !57 (closed), @douardda wrote: Should we be worried that tests are green after this diff?
We only test that the partitioning works (i.e. that we can generate partitions) and, I think, that all partitions yield all the entries.
In any case, one of the bitbucket lister tests was red before I did the ugly ugly string -> datetime bodge.
mentioned in commit dd148fc6
Some references in the commit message have been migrated:
- D1267 is now !57 (closed)
mentioned in commit c574897e