Is there anything on the roadmap that involves improved support for pagination?
The SKIP/LIMIT approach is obviously not viable for large data sets (as it’s currently implemented) and there is no ability to use the “greater than the last record” approach on multiple fields (described as the “RID/LIMIT” approach, which also works with any single field). See topic 440.
Paging is such a common issue, and is frankly not something that any database really handles well, but I could envision a specialized aggregate index (maybe set through a meta parameter) that would handle this quite well. And having this in ODB would just add another “unique value proposition” to the product.
PS - This is generally referred to as “keyset pagination”, but to make it truly useful, it has to be able to support a “key” that is made up of multiple fields, without the restriction that all but the last field must be a fixed value for all records in the set.
PPS - In my research on this topic, I found an interesting reference to a feature of PostgreSQL, which is exactly what I’m proposing here. The following syntax can be used in a SQL query:
(VAL1, VAL2, VAL3, ...) >= (FIELD1, FIELD2, FIELD3, ...)