Paginate on index.

Paginating on a simple offset doesn't perform well as the table must be scanned up to the offset.
Fix issue with timestamp/timezones.