Right now the query uses `OFFSET` and `LIMIT` which works OK but would be better to use `INDEX` as it would be more efficient.