Matt Allan explains why using an offset is slow when used on large datasets.

It turns out it’s easy to page through results without using offset. All we have to do is keep track of the last ID we saw, then filter the results so we only fetch rows we haven’t seen.

https://mattallan.me/posts/making-laravel-scout-64x-faster/