All challenges
Multiple ChoiceBeginner 45s

Cursor vs offset pagination

Why is cursor (keyset) pagination preferred over offset pagination for large, changing datasets?
Options
  1. 1It returns fewer total rows, so the database transfers far less data over the network and the client spends less time deserializing
  2. 2Offset pagination cannot use indexes at all, so every page requires a full sequential scan regardless of how the query is written
  3. 3OFFSET forces the DB to scan and discard N rows and can skip/duplicate items when rows change between pages; a cursor anchors to a stable key
  4. 4Cursors compress the response payload, so each page carries far fewer bytes and the round-trip is dominated by compression savings

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle