pilagod / gorm-cursor-paginator

A paginator doing cursor-based pagination based on GORM
https://github.com/pilagod/gorm-cursor-paginator
MIT License
188 stars 44 forks source link

feat: Add optimization feature for composite cursors #62

Closed tadeboro closed 3 months ago

tadeboro commented 4 months ago

Current implementation of pagination on composite cursors is rather inefficient on large tables even in the presence of index. Changes in this commit add an optimization option that causes paginator to emit a bit different WHERE condition that query engines have an easier time optimizing.

We kept changes backward-compatible. We need to opt-in to get the new feature enabled.

coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 9281306496

Details


Totals Coverage Status
Change from base Build 8872589309: 0.3%
Covered Lines: 406
Relevant Lines: 419

💛 - Coveralls
pilagod commented 3 months ago

@tadeboro I just released v2.6.0 to include this feature. Thank you so much for the contribution. 💪

tadeboro commented 3 months ago

@pilagod Thank you for you patience and reviews of my half-baked commits!