Multiple ChoiceBeginner 45s
Keyset pagination on a busy table
Why is keyset (cursor) pagination preferred over large OFFSET pagination on a busy table?
Options
- 1It returns fewer columns per row, so the engine scans the full preceding set to reconstruct the projection from the base table
- 2OFFSET scans and discards all preceding rows, so cost grows with page depth and concurrent inserts cause skipped or duplicated rows
- 3Cursors compress better over the wire, so paginating with them avoids the extra row reads OFFSET performs at deep page depths
- 4OFFSET cannot combine with an ORDER BY, so the engine materializes and re-sorts the whole result set on every page request
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.