See also this previous Topic. Particularly since you include “offset” in the title.
I was helpful for me to be mindful of what Ben here identifies as keyset pagination, as opposed to offset pagination.
The linked article concludes that you should be really, REALLY sure that you need
- Exact page number
- High page numbers
- The last page number
- The total number of rows
Because most applications don’t, and by avoiding those things you can improve both performance (cost!) and user experience at the same time.