How
Query with fetch_size (default 5000). Server returns rows + paging_state. Client passes state next call. Repeat until state null.
Advertisement
Not stateless
Paging state points into SSTables. Node restart or SSTable compaction can invalidate. Not for user-facing 'page N' UI.
Advertisement
User-facing pagination
Use clustering key ordering + WHERE clause. 'WHERE id > last_seen_id ORDER BY id LIMIT 20'. Deterministic + resumable.