-
Hello, I'm using pagy to paginate results from a warehouse table that has millions of records and the query to retrieve the records is fast but the count (I guess to get the total number of items) is taking too long, is there any way to improve this? maybe a configuration? FYI: we are using arel also. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Do you need a full nav bar? If not: https://ddnexus.github.io/pagy/docs/api/countless/ - this doesn't use the count query BUT you won't be able to jump to page 88 etc. because pagy will not know if such a page exists. Or the other way is cursor based pagination: https://github.com/Uysim/pagy-cursor (I haven't used this library though). |
Beta Was this translation helpful? Give feedback.
Do you need a full nav bar? If not: https://ddnexus.github.io/pagy/docs/api/countless/ - this doesn't use the count query BUT you won't be able to jump to page 88 etc. because pagy will not know if such a page exists.
Or the other way is cursor based pagination: https://github.com/Uysim/pagy-cursor (I haven't used this library though).